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 CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 bool UpdateMenuItems(const std::vector<MenuItem>& items); | 144 bool UpdateMenuItems(const std::vector<MenuItem>& items); |
145 | 145 |
146 private: | 146 private: |
147 // Converts MenuItem to InputMethodMenuItem. | 147 // Converts MenuItem to InputMethodMenuItem. |
148 void MenuItemToProperty(const MenuItem& item, | 148 void MenuItemToProperty(const MenuItem& item, |
149 ui::ime::InputMethodMenuItem* property); | 149 ui::ime::InputMethodMenuItem* property); |
150 | 150 |
151 // Enables overriding input view page to Virtual Keyboard window. | 151 // Enables overriding input view page to Virtual Keyboard window. |
152 void EnableInputView(); | 152 void EnableInputView(); |
153 | 153 |
| 154 // input_method::InputMethodEngineBase: |
| 155 void UpdateComposition(const ui::CompositionText& composition_text, |
| 156 uint32_t cursor_pos, |
| 157 bool is_visible) override; |
| 158 void CommitTextToInputContext(int context_id, |
| 159 const std::string& text) override; |
| 160 |
154 // The current candidate window. | 161 // The current candidate window. |
155 scoped_ptr<ui::CandidateWindow> candidate_window_; | 162 scoped_ptr<ui::CandidateWindow> candidate_window_; |
156 | 163 |
157 // The current candidate window property. | 164 // The current candidate window property. |
158 CandidateWindowProperty candidate_window_property_; | 165 CandidateWindowProperty candidate_window_property_; |
159 | 166 |
160 // Indicates whether the candidate window is visible. | 167 // Indicates whether the candidate window is visible. |
161 bool window_visible_; | 168 bool window_visible_; |
162 | 169 |
163 // Mapping of candidate index to candidate id. | 170 // Mapping of candidate index to candidate id. |
164 std::vector<int> candidate_ids_; | 171 std::vector<int> candidate_ids_; |
165 | 172 |
166 // Mapping of candidate id to index. | 173 // Mapping of candidate id to index. |
167 std::map<int, int> candidate_indexes_; | 174 std::map<int, int> candidate_indexes_; |
168 }; | 175 }; |
169 | 176 |
170 } // namespace chromeos | 177 } // namespace chromeos |
171 | 178 |
172 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ | 179 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ |
OLD | NEW |