| 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 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 } | 67 } |
| 68 | 68 |
| 69 const ui::KeyEvent* last_processed_key_event() const { | 69 const ui::KeyEvent* last_processed_key_event() const { |
| 70 return last_processed_key_event_.get(); | 70 return last_processed_key_event_.get(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 const KeyEventDoneCallback& last_passed_callback() const { | 73 const KeyEventDoneCallback& last_passed_callback() const { |
| 74 return last_passed_callback_; | 74 return last_passed_callback_; |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool SetComposition(int context_id, | |
| 78 const char* text, | |
| 79 int selection_start, | |
| 80 int selection_end, | |
| 81 int cursor, | |
| 82 const std::vector<SegmentInfo>& segments, | |
| 83 std::string* error) override; | |
| 84 | |
| 85 bool ClearComposition(int context_id, std::string* error) override; | 77 bool ClearComposition(int context_id, std::string* error) override; |
| 86 | 78 |
| 87 bool CommitText(int context_id, | 79 bool CommitText(int context_id, |
| 88 const char* text, | 80 const char* text, |
| 89 std::string* error) override; | 81 std::string* error) override; |
| 90 | 82 |
| 91 bool SendKeyEvents(int context_id, | |
| 92 const std::vector<KeyboardEvent>& events) override; | |
| 93 | |
| 94 bool IsActive() const override; | 83 bool IsActive() const override; |
| 95 | 84 |
| 96 const std::string& GetActiveComponentId() const override; | 85 const std::string& GetActiveComponentId() const override; |
| 97 | 86 |
| 98 bool DeleteSurroundingText(int context_id, | 87 bool DeleteSurroundingText(int context_id, |
| 99 int offset, | 88 int offset, |
| 100 size_t number_of_chars, | 89 size_t number_of_chars, |
| 101 std::string* error) override; | 90 std::string* error) override; |
| 102 | 91 |
| 103 const CandidateWindowProperty& GetCandidateWindowProperty() const override; | |
| 104 | |
| 105 void SetCandidateWindowProperty( | |
| 106 const CandidateWindowProperty& property) override {} | |
| 107 | |
| 108 bool SetCandidateWindowVisible(bool visible, std::string* error) override; | 92 bool SetCandidateWindowVisible(bool visible, std::string* error) override; |
| 109 | 93 |
| 110 bool SetCandidates(int context_id, | |
| 111 const std::vector<Candidate>& candidates, | |
| 112 std::string* error) override; | |
| 113 | |
| 114 bool SetCursorPosition(int context_id, | 94 bool SetCursorPosition(int context_id, |
| 115 int candidate_id, | 95 int candidate_id, |
| 116 std::string* error) override; | 96 std::string* error) override; |
| 117 | 97 |
| 118 bool SetMenuItems(const std::vector<MenuItem>& items) override; | |
| 119 | |
| 120 bool UpdateMenuItems(const std::vector<MenuItem>& items) override; | |
| 121 | |
| 122 void HideInputView() override {} | 98 void HideInputView() override {} |
| 123 | 99 |
| 124 private: | 100 private: |
| 125 int focus_in_call_count_; | 101 int focus_in_call_count_; |
| 126 int focus_out_call_count_; | 102 int focus_out_call_count_; |
| 127 int set_surrounding_text_call_count_; | 103 int set_surrounding_text_call_count_; |
| 128 int process_key_event_call_count_; | 104 int process_key_event_call_count_; |
| 129 int reset_call_count_; | 105 int reset_call_count_; |
| 130 InputContext last_text_input_context_; | 106 InputContext last_text_input_context_; |
| 131 std::string last_activated_property_; | 107 std::string last_activated_property_; |
| 132 std::string last_set_surrounding_text_; | 108 std::string last_set_surrounding_text_; |
| 133 uint32_t last_set_surrounding_cursor_pos_; | 109 uint32_t last_set_surrounding_cursor_pos_; |
| 134 uint32_t last_set_surrounding_anchor_pos_; | 110 uint32_t last_set_surrounding_anchor_pos_; |
| 135 scoped_ptr<ui::KeyEvent> last_processed_key_event_; | 111 scoped_ptr<ui::KeyEvent> last_processed_key_event_; |
| 136 KeyEventDoneCallback last_passed_callback_; | 112 KeyEventDoneCallback last_passed_callback_; |
| 137 std::string active_component_id_; | 113 std::string active_component_id_; |
| 138 CandidateWindowProperty candidate_window_property_; | |
| 139 }; | 114 }; |
| 140 | 115 |
| 141 } // namespace chromeos | 116 } // namespace chromeos |
| 142 | 117 |
| 143 #endif // UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_ | 118 #endif // UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_ |
| OLD | NEW |