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/ime/ibus_bridge.h" | 12 #include "chromeos/ime/ibus_bridge.h" |
13 #include "dbus/object_path.h" | 13 #include "dbus/object_path.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 class IBusComponent; | |
18 class IBusText; | 17 class IBusText; |
19 | 18 |
20 class IBusEngineFactoryService; | 19 class IBusEngineFactoryService; |
21 class IBusEngineService; | 20 class IBusEngineService; |
22 | 21 |
23 namespace input_method { | 22 namespace input_method { |
24 class CandidateWindow; | 23 class CandidateWindow; |
25 struct KeyEventHandle; | 24 struct KeyEventHandle; |
26 } // namespace input_method | 25 } // namespace input_method |
27 | 26 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 scoped_ptr<IBusText> aux_text_; | 143 scoped_ptr<IBusText> aux_text_; |
145 bool aux_text_visible_; | 144 bool aux_text_visible_; |
146 | 145 |
147 // Pointer to the object recieving events for this IME. | 146 // Pointer to the object recieving events for this IME. |
148 InputMethodEngine::Observer* observer_; | 147 InputMethodEngine::Observer* observer_; |
149 | 148 |
150 // The current preedit text, and it's cursor position. | 149 // The current preedit text, and it's cursor position. |
151 scoped_ptr<IBusText> preedit_text_; | 150 scoped_ptr<IBusText> preedit_text_; |
152 int preedit_cursor_; | 151 int preedit_cursor_; |
153 | 152 |
154 // The current engine component. | |
155 scoped_ptr<IBusComponent> component_; | |
156 | |
157 // The current candidate window. | 153 // The current candidate window. |
158 scoped_ptr<input_method::CandidateWindow> candidate_window_; | 154 scoped_ptr<input_method::CandidateWindow> candidate_window_; |
159 | 155 |
160 // The current candidate window property. | 156 // The current candidate window property. |
161 CandidateWindowProperty candidate_window_property_; | 157 CandidateWindowProperty candidate_window_property_; |
162 | 158 |
163 // Indicates whether the candidate window is visible. | 159 // Indicates whether the candidate window is visible. |
164 bool window_visible_; | 160 bool window_visible_; |
165 | 161 |
166 // Mapping of candidate index to candidate id. | 162 // Mapping of candidate index to candidate id. |
167 std::vector<int> candidate_ids_; | 163 std::vector<int> candidate_ids_; |
168 | 164 |
169 // Mapping of candidate id to index. | 165 // Mapping of candidate id to index. |
170 std::map<int, int> candidate_indexes_; | 166 std::map<int, int> candidate_indexes_; |
171 | 167 |
172 scoped_ptr<IBusEngineService> ibus_engine_service_; | 168 scoped_ptr<IBusEngineService> ibus_engine_service_; |
173 scoped_ptr<IBusEngineFactoryService> ibus_engine_factory_service_; | 169 scoped_ptr<IBusEngineFactoryService> ibus_engine_factory_service_; |
174 | 170 |
175 // Used for making callbacks. | 171 // Used for making callbacks. |
176 base::WeakPtrFactory<InputMethodEngineIBus> weak_ptr_factory_; | 172 base::WeakPtrFactory<InputMethodEngineIBus> weak_ptr_factory_; |
177 }; | 173 }; |
178 | 174 |
179 } // namespace chromeos | 175 } // namespace chromeos |
180 | 176 |
181 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_IBUS_H_ | 177 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_IBUS_H_ |
OLD | NEW |