OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_IBUS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_IBUS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_IBUS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_IBUS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 #include "chrome/browser/chromeos/input_method/input_method_engine.h" | 11 #include "chrome/browser/chromeos/input_method/input_method_engine.h" |
12 #include "chromeos/dbus/ibus/ibus_engine_factory_service.h" | 12 #include "chromeos/dbus/ibus/ibus_engine_factory_service.h" |
13 #include "chromeos/dbus/ibus/ibus_engine_service.h" | 13 #include "chromeos/dbus/ibus/ibus_engine_service.h" |
14 #include "chromeos/ime/ibus_bridge.h" | 14 #include "chromeos/ime/ibus_bridge.h" |
15 #include "dbus/object_path.h" | 15 #include "dbus/object_path.h" |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 | 18 |
19 class IBusComponent; | 19 class IBusComponent; |
20 class IBusLookupTable; | |
21 class IBusText; | 20 class IBusText; |
22 | 21 |
23 class IBusEngineService; | 22 class IBusEngineService; |
24 namespace input_method { | 23 namespace input_method { |
| 24 class CandidateWindow; |
25 struct KeyEventHandle; | 25 struct KeyEventHandle; |
26 } // namespace input_method | 26 } // namespace input_method |
27 | 27 |
28 class InputMethodEngineIBus : public InputMethodEngine, | 28 class InputMethodEngineIBus : public InputMethodEngine, |
29 public IBusEngineHandlerInterface { | 29 public IBusEngineHandlerInterface { |
30 public: | 30 public: |
31 InputMethodEngineIBus(); | 31 InputMethodEngineIBus(); |
32 | 32 |
33 virtual ~InputMethodEngineIBus(); | 33 virtual ~InputMethodEngineIBus(); |
34 | 34 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // Pointer to the object recieving events for this IME. | 157 // Pointer to the object recieving events for this IME. |
158 InputMethodEngine::Observer* observer_; | 158 InputMethodEngine::Observer* observer_; |
159 | 159 |
160 // The current preedit text, and it's cursor position. | 160 // The current preedit text, and it's cursor position. |
161 scoped_ptr<IBusText> preedit_text_; | 161 scoped_ptr<IBusText> preedit_text_; |
162 int preedit_cursor_; | 162 int preedit_cursor_; |
163 | 163 |
164 // The current engine component. | 164 // The current engine component. |
165 scoped_ptr<IBusComponent> component_; | 165 scoped_ptr<IBusComponent> component_; |
166 | 166 |
167 // The current lookup table. | 167 // The current candidate window. |
168 scoped_ptr<IBusLookupTable> table_; | 168 scoped_ptr<input_method::CandidateWindow> candidate_window_; |
169 | 169 |
170 // The current candidate window property. | 170 // The current candidate window property. |
171 CandidateWindowProperty candidate_window_property_; | 171 CandidateWindowProperty candidate_window_property_; |
172 | 172 |
173 // Indicates whether the candidate window is visible. | 173 // Indicates whether the candidate window is visible. |
174 bool window_visible_; | 174 bool window_visible_; |
175 | 175 |
176 // Mapping of candidate index to candidate id. | 176 // Mapping of candidate index to candidate id. |
177 std::vector<int> candidate_ids_; | 177 std::vector<int> candidate_ids_; |
178 | 178 |
179 // Mapping of candidate id to index. | 179 // Mapping of candidate id to index. |
180 std::map<int, int> candidate_indexes_; | 180 std::map<int, int> candidate_indexes_; |
181 | 181 |
182 // Used for making callbacks. | 182 // Used for making callbacks. |
183 base::WeakPtrFactory<InputMethodEngineIBus> weak_ptr_factory_; | 183 base::WeakPtrFactory<InputMethodEngineIBus> weak_ptr_factory_; |
184 }; | 184 }; |
185 | 185 |
186 } // namespace chromeos | 186 } // namespace chromeos |
187 | 187 |
188 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_IBUS_H_ | 188 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_IBUS_H_ |
OLD | NEW |