| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 virtual void EnableLoginLayouts( | 58 virtual void EnableLoginLayouts( |
| 59 const std::string& language_code, | 59 const std::string& language_code, |
| 60 const std::vector<std::string>& initial_layouts) OVERRIDE; | 60 const std::vector<std::string>& initial_layouts) OVERRIDE; |
| 61 virtual bool ReplaceEnabledInputMethods( | 61 virtual bool ReplaceEnabledInputMethods( |
| 62 const std::vector<std::string>& new_active_input_method_ids) OVERRIDE; | 62 const std::vector<std::string>& new_active_input_method_ids) OVERRIDE; |
| 63 virtual bool EnableInputMethod(const std::string& new_active_input_method_id) | 63 virtual bool EnableInputMethod(const std::string& new_active_input_method_id) |
| 64 OVERRIDE; | 64 OVERRIDE; |
| 65 virtual void ChangeInputMethod(const std::string& input_method_id) OVERRIDE; | 65 virtual void ChangeInputMethod(const std::string& input_method_id) OVERRIDE; |
| 66 virtual void ActivateInputMethodMenuItem(const std::string& key) OVERRIDE; | 66 virtual void ActivateInputMethodMenuItem(const std::string& key) OVERRIDE; |
| 67 virtual void AddInputMethodExtension( | 67 virtual void AddInputMethodExtension( |
| 68 const std::string& id, | 68 const std::string& extension_id, |
| 69 const InputMethodDescriptors& descriptors, |
| 69 InputMethodEngineInterface* instance) OVERRIDE; | 70 InputMethodEngineInterface* instance) OVERRIDE; |
| 70 virtual void RemoveInputMethodExtension(const std::string& id) OVERRIDE; | 71 virtual void RemoveInputMethodExtension( |
| 72 const std::string& extension_id) OVERRIDE; |
| 71 virtual void GetInputMethodExtensions( | 73 virtual void GetInputMethodExtensions( |
| 72 InputMethodDescriptors* result) OVERRIDE; | 74 InputMethodDescriptors* result) OVERRIDE; |
| 73 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) OVERRIDE; | 75 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) OVERRIDE; |
| 74 virtual void SetInputMethodLoginDefault() OVERRIDE; | 76 virtual void SetInputMethodLoginDefault() OVERRIDE; |
| 75 virtual void SetInputMethodLoginDefaultFromVPD( | 77 virtual void SetInputMethodLoginDefaultFromVPD( |
| 76 const std::string& locale, const std::string& layout) OVERRIDE; | 78 const std::string& locale, const std::string& layout) OVERRIDE; |
| 77 virtual bool SwitchToNextInputMethod() OVERRIDE; | 79 virtual bool SwitchToNextInputMethod() OVERRIDE; |
| 78 virtual bool SwitchToPreviousInputMethod( | 80 virtual bool SwitchToPreviousInputMethod( |
| 79 const ui::Accelerator& accelerator) OVERRIDE; | 81 const ui::Accelerator& accelerator) OVERRIDE; |
| 80 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) OVERRIDE; | 82 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) OVERRIDE; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 scoped_ptr<ComponentExtensionIMEManager> component_extension_ime_manager_; | 198 scoped_ptr<ComponentExtensionIMEManager> component_extension_ime_manager_; |
| 197 | 199 |
| 198 // An object for switching XKB layouts and keyboard status like caps lock and | 200 // An object for switching XKB layouts and keyboard status like caps lock and |
| 199 // auto-repeat interval. | 201 // auto-repeat interval. |
| 200 scoped_ptr<ImeKeyboard> keyboard_; | 202 scoped_ptr<ImeKeyboard> keyboard_; |
| 201 | 203 |
| 202 base::ThreadChecker thread_checker_; | 204 base::ThreadChecker thread_checker_; |
| 203 | 205 |
| 204 base::WeakPtrFactory<InputMethodManagerImpl> weak_ptr_factory_; | 206 base::WeakPtrFactory<InputMethodManagerImpl> weak_ptr_factory_; |
| 205 | 207 |
| 206 // The engine map: | 208 std::map<std::string, InputMethodEngineInterface*> engine_map_; |
| 207 // { Profile : { input_method_id : Engine } }. | |
| 208 typedef std::map<std::string, InputMethodEngineInterface*> | |
| 209 EngineMap; | |
| 210 typedef std::map<Profile*, EngineMap, ProfileCompare> ProfileEngineMap; | |
| 211 ProfileEngineMap profile_engine_map_; | |
| 212 | 209 |
| 213 DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImpl); | 210 DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImpl); |
| 214 }; | 211 }; |
| 215 | 212 |
| 216 } // namespace input_method | 213 } // namespace input_method |
| 217 } // namespace chromeos | 214 } // namespace chromeos |
| 218 | 215 |
| 219 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ | 216 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ |
| OLD | NEW |