test_ime_controller_client.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2018 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. #ifndef ASH_IME_TEST_IME_CONTROLLER_CLIENT_H_
  5. #define ASH_IME_TEST_IME_CONTROLLER_CLIENT_H_
  6. #include "ash/public/cpp/ime_controller_client.h"
  7. namespace ash {
  8. class TestImeControllerClient : public ImeControllerClient {
  9. public:
  10. TestImeControllerClient();
  11. TestImeControllerClient(const TestImeControllerClient&) = delete;
  12. TestImeControllerClient& operator=(const TestImeControllerClient&) = delete;
  13. ~TestImeControllerClient();
  14. // ImeControllerClient:
  15. void SwitchToNextIme() override;
  16. void SwitchToLastUsedIme() override;
  17. void SwitchImeById(const std::string& id, bool show_message) override;
  18. void ActivateImeMenuItem(const std::string& key) override;
  19. void SetCapsLockEnabled(bool enabled) override;
  20. void OverrideKeyboardKeyset(input_method::ImeKeyset keyset,
  21. OverrideKeyboardKeysetCallback callback) override;
  22. void UpdateMirroringState(bool enabled) override;
  23. void UpdateCastingState(bool enabled) override;
  24. void ShowModeIndicator() override;
  25. int next_ime_count_ = 0;
  26. int last_used_ime_count_ = 0;
  27. int switch_ime_count_ = 0;
  28. int set_caps_lock_count_ = 0;
  29. std::string last_switch_ime_id_;
  30. bool last_show_message_ = false;
  31. input_method::ImeKeyset last_keyset_ = input_method::ImeKeyset::kNone;
  32. bool is_mirroring_ = false;
  33. bool is_casting_ = false;
  34. int show_mode_indicator_count_ = 0;
  35. };
  36. } // namespace ash
  37. #endif // ASH_IME_TEST_IME_CONTROLLER_CLIENT_H_