mock_input_channel.cc 872 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ash/services/ime/mock_input_channel.h"
  5. namespace ash {
  6. namespace ime {
  7. MockInputChannel::MockInputChannel() : receiver_(this) {}
  8. MockInputChannel::~MockInputChannel() = default;
  9. mojo::PendingRemote<mojom::InputChannel>
  10. MockInputChannel::CreatePendingRemote() {
  11. return receiver_.BindNewPipeAndPassRemote();
  12. }
  13. bool MockInputChannel::IsBound() const {
  14. return receiver_.is_bound();
  15. }
  16. void MockInputChannel::FlushForTesting() {
  17. return receiver_.FlushForTesting();
  18. }
  19. void MockInputChannel::ProcessMessage(const std::vector<uint8_t>& message,
  20. ProcessMessageCallback callback) {
  21. std::move(callback).Run({});
  22. }
  23. } // namespace ime
  24. } // namespace ash