OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_ | 5 #ifndef UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_ |
6 #define UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_ | 6 #define UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include "ui/base/ime/ime_engine_handler_interface.h" | 11 #include "ui/base/ime/ime_engine_handler_interface.h" |
12 #include "ui/base/ime/ui_base_ime_export.h" | 12 #include "ui/base/ime/ui_base_ime_export.h" |
13 #include "ui/events/event.h" | 13 #include "ui/events/event.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 class UI_BASE_IME_EXPORT MockIMEEngineHandler | 17 class UI_BASE_IME_EXPORT MockIMEEngineHandler |
18 : public ui::IMEEngineHandlerInterface { | 18 : public ui::IMEEngineHandlerInterface { |
19 public: | 19 public: |
20 MockIMEEngineHandler(); | 20 MockIMEEngineHandler(); |
21 ~MockIMEEngineHandler() override; | 21 ~MockIMEEngineHandler() override; |
22 | 22 |
23 void FocusIn(const InputContext& input_context) override; | 23 void FocusIn(const InputContext& input_context) override; |
24 void FocusOut() override; | 24 void FocusOut() override; |
25 void Enable(const std::string& component_id) override; | 25 void Enable(const std::string& component_id) override; |
26 void Disable() override; | 26 void Disable() override; |
27 void PropertyActivate(const std::string& property_name) override; | 27 void PropertyActivate(const std::string& property_name) override; |
28 void Reset() override; | 28 void Reset() override; |
| 29 void MaybeSwitchEngine() override; |
29 bool IsInterestedInKeyEvent() const override; | 30 bool IsInterestedInKeyEvent() const override; |
30 void ProcessKeyEvent(const ui::KeyEvent& key_event, | 31 void ProcessKeyEvent(const ui::KeyEvent& key_event, |
31 KeyEventDoneCallback& callback) override; | 32 KeyEventDoneCallback& callback) override; |
32 void CandidateClicked(uint32_t index) override; | 33 void CandidateClicked(uint32_t index) override; |
33 void SetSurroundingText(const std::string& text, | 34 void SetSurroundingText(const std::string& text, |
34 uint32_t cursor_pos, | 35 uint32_t cursor_pos, |
35 uint32_t anchor_pos, | 36 uint32_t anchor_pos, |
36 uint32_t offset_pos) override; | 37 uint32_t offset_pos) override; |
37 void SetCompositionBounds(const std::vector<gfx::Rect>& bounds) override; | 38 void SetCompositionBounds(const std::vector<gfx::Rect>& bounds) override; |
38 | 39 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 uint32_t last_set_surrounding_cursor_pos_; | 110 uint32_t last_set_surrounding_cursor_pos_; |
110 uint32_t last_set_surrounding_anchor_pos_; | 111 uint32_t last_set_surrounding_anchor_pos_; |
111 std::unique_ptr<ui::KeyEvent> last_processed_key_event_; | 112 std::unique_ptr<ui::KeyEvent> last_processed_key_event_; |
112 KeyEventDoneCallback last_passed_callback_; | 113 KeyEventDoneCallback last_passed_callback_; |
113 std::string active_component_id_; | 114 std::string active_component_id_; |
114 }; | 115 }; |
115 | 116 |
116 } // namespace chromeos | 117 } // namespace chromeos |
117 | 118 |
118 #endif // UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_ | 119 #endif // UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_ |
OLD | NEW |