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_MANAGER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
215 | 215 |
216 // Loads necessary component extensions. | 216 // Loads necessary component extensions. |
217 // TODO(nona): Support dynamical unloading. | 217 // TODO(nona): Support dynamical unloading. |
218 void LoadNecessaryComponentExtensions(StateImpl* state); | 218 void LoadNecessaryComponentExtensions(StateImpl* state); |
219 | 219 |
220 // Starts or stops the system input method framework as needed. | 220 // Starts or stops the system input method framework as needed. |
221 // (after list of enabled input methods has been updated). | 221 // (after list of enabled input methods has been updated). |
222 // If state is active, active input method is updated. | 222 // If state is active, active input method is updated. |
223 void ReconfigureIMFramework(StateImpl* state); | 223 void ReconfigureIMFramework(StateImpl* state); |
224 | 224 |
225 // Record input method usage histograms. | |
226 void RecordInputMethodUsage(std::string input_method_id); | |
227 | |
225 scoped_ptr<InputMethodDelegate> delegate_; | 228 scoped_ptr<InputMethodDelegate> delegate_; |
226 | 229 |
227 // The current UI session status. | 230 // The current UI session status. |
228 UISessionState ui_session_; | 231 UISessionState ui_session_; |
229 | 232 |
230 // A list of objects that monitor the manager. | 233 // A list of objects that monitor the manager. |
231 ObserverList<InputMethodManager::Observer> observers_; | 234 ObserverList<InputMethodManager::Observer> observers_; |
232 ObserverList<CandidateWindowObserver> candidate_window_observers_; | 235 ObserverList<CandidateWindowObserver> candidate_window_observers_; |
233 | 236 |
234 scoped_refptr<StateImpl> state_; | 237 scoped_refptr<StateImpl> state_; |
(...skipping 14 matching lines...) Expand all Loading... | |
249 scoped_ptr<ImeKeyboard> keyboard_; | 252 scoped_ptr<ImeKeyboard> keyboard_; |
250 | 253 |
251 | 254 |
252 // Whether load IME extensions. | 255 // Whether load IME extensions. |
253 bool enable_extension_loading_; | 256 bool enable_extension_loading_; |
254 | 257 |
255 // The engine map from extension_id to an engine. | 258 // The engine map from extension_id to an engine. |
256 typedef std::map<std::string, InputMethodEngineInterface*> EngineMap; | 259 typedef std::map<std::string, InputMethodEngineInterface*> EngineMap; |
257 EngineMap engine_map_; | 260 EngineMap engine_map_; |
258 | 261 |
262 // The map from input method id to the input method stat id. | |
263 // The stat id has the format: <category#><first char after prefix><index> | |
264 // For example, Chinese Simplified Pinyin IME has the stat id: | |
265 // 2,'p',1 -> 211201 | |
266 // 2 means it in INPUT_METHOD_CATEGORY_ZH; | |
267 // 112 means the first char after prefix is 'p' of 'pinyin'; | |
Ilya Sherman
2014/09/16 21:51:48
I assume you're restricting only to lower ASCII ch
Shu Chen
2014/09/17 15:17:28
I'm not using range of 0 to 25 because it can be d
| |
268 // 01 means it's the second pinyin as the first pinyin is for Traditional | |
269 // Chinese Pinyin IME. Note "zh-hant-t-i0-pinyin" < "zh-t-i0-pinyin". | |
270 std::map<std::string, int> stat_id_map_; | |
271 | |
259 DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImpl); | 272 DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImpl); |
260 }; | 273 }; |
261 | 274 |
262 } // namespace input_method | 275 } // namespace input_method |
263 } // namespace chromeos | 276 } // namespace chromeos |
264 | 277 |
265 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ | 278 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ |
OLD | NEW |