Chromium Code Reviews| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 | 129 |
| 130 // The list of enabled extension IMEs. | 130 // The list of enabled extension IMEs. |
| 131 std::vector<std::string> enabled_extension_imes; | 131 std::vector<std::string> enabled_extension_imes; |
| 132 | 132 |
| 133 // Extra input methods that have been explicitly added to the menu, such as | 133 // Extra input methods that have been explicitly added to the menu, such as |
| 134 // those created by extension. | 134 // those created by extension. |
| 135 std::map<std::string, InputMethodDescriptor> extra_input_methods; | 135 std::map<std::string, InputMethodDescriptor> extra_input_methods; |
| 136 | 136 |
| 137 InputMethodManagerImpl* const manager_; | 137 InputMethodManagerImpl* const manager_; |
| 138 | 138 |
| 139 // True if the opt-in IME menu is activated. | |
| 140 bool menu_activated; | |
| 141 | |
| 139 protected: | 142 protected: |
| 140 friend base::RefCounted<chromeos::input_method::InputMethodManager::State>; | 143 friend base::RefCounted<chromeos::input_method::InputMethodManager::State>; |
| 141 ~StateImpl() override; | 144 ~StateImpl() override; |
| 142 }; | 145 }; |
| 143 | 146 |
| 144 // Constructs an InputMethodManager instance. The client is responsible for | 147 // Constructs an InputMethodManager instance. The client is responsible for |
| 145 // calling |SetUISessionState| in response to relevant changes in browser | 148 // calling |SetUISessionState| in response to relevant changes in browser |
| 146 // state. | 149 // state. |
| 147 InputMethodManagerImpl(std::unique_ptr<InputMethodDelegate> delegate, | 150 InputMethodManagerImpl(std::unique_ptr<InputMethodDelegate> delegate, |
| 148 bool enable_extension_loading); | 151 bool enable_extension_loading); |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 164 void RemoveImeMenuObserver( | 167 void RemoveImeMenuObserver( |
| 165 InputMethodManager::ImeMenuObserver* observer) override; | 168 InputMethodManager::ImeMenuObserver* observer) override; |
| 166 std::unique_ptr<InputMethodDescriptors> GetSupportedInputMethods() | 169 std::unique_ptr<InputMethodDescriptors> GetSupportedInputMethods() |
| 167 const override; | 170 const override; |
| 168 void ActivateInputMethodMenuItem(const std::string& key) override; | 171 void ActivateInputMethodMenuItem(const std::string& key) override; |
| 169 bool IsISOLevel5ShiftUsedByCurrentInputMethod() const override; | 172 bool IsISOLevel5ShiftUsedByCurrentInputMethod() const override; |
| 170 bool IsAltGrUsedByCurrentInputMethod() const override; | 173 bool IsAltGrUsedByCurrentInputMethod() const override; |
| 171 void NotifyImeMenuItemsChanged( | 174 void NotifyImeMenuItemsChanged( |
| 172 const std::string& engine_id, | 175 const std::string& engine_id, |
| 173 const std::vector<InputMethodManager::MenuItem>& items) override; | 176 const std::vector<InputMethodManager::MenuItem>& items) override; |
| 177 void MaybeNotifyImeMenuActivationChanged() override; | |
| 174 | 178 |
| 175 // chromeos::UserAddingScreen: | 179 // chromeos::UserAddingScreen: |
| 176 void OnUserAddingStarted() override; | 180 void OnUserAddingStarted() override; |
| 177 void OnUserAddingFinished() override; | 181 void OnUserAddingFinished() override; |
| 178 | 182 |
| 179 ImeKeyboard* GetImeKeyboard() override; | 183 ImeKeyboard* GetImeKeyboard() override; |
| 180 InputMethodUtil* GetInputMethodUtil() override; | 184 InputMethodUtil* GetInputMethodUtil() override; |
| 181 ComponentExtensionIMEManager* GetComponentExtensionIMEManager() override; | 185 ComponentExtensionIMEManager* GetComponentExtensionIMEManager() override; |
| 182 bool IsLoginKeyboard(const std::string& layout) const override; | 186 bool IsLoginKeyboard(const std::string& layout) const override; |
| 183 | 187 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 277 std::unique_ptr<ComponentExtensionIMEManager> | 281 std::unique_ptr<ComponentExtensionIMEManager> |
| 278 component_extension_ime_manager_; | 282 component_extension_ime_manager_; |
| 279 | 283 |
| 280 // An object for switching XKB layouts and keyboard status like caps lock and | 284 // An object for switching XKB layouts and keyboard status like caps lock and |
| 281 // auto-repeat interval. | 285 // auto-repeat interval. |
| 282 std::unique_ptr<ImeKeyboard> keyboard_; | 286 std::unique_ptr<ImeKeyboard> keyboard_; |
| 283 | 287 |
| 284 // Whether load IME extensions. | 288 // Whether load IME extensions. |
| 285 bool enable_extension_loading_; | 289 bool enable_extension_loading_; |
| 286 | 290 |
| 287 // Whether the expanded IME menu is activated. | |
| 288 bool is_ime_menu_activated_; | |
| 289 | |
| 290 // The engine map from extension_id to an engine. | 291 // The engine map from extension_id to an engine. |
| 291 typedef std::map<std::string, ui::IMEEngineHandlerInterface*> EngineMap; | 292 typedef std::map<std::string, ui::IMEEngineHandlerInterface*> EngineMap; |
| 292 typedef std::map<Profile*, EngineMap, ProfileCompare> ProfileEngineMap; | 293 typedef std::map<Profile*, EngineMap, ProfileCompare> ProfileEngineMap; |
| 293 ProfileEngineMap engine_map_; | 294 ProfileEngineMap engine_map_; |
| 294 | 295 |
| 296 // True if the opt-in IME menu is activated. | |
| 297 bool menu_activated_; | |
|
Shu Chen
2016/08/29 08:20:08
maybe revert this rename change?
Azure Wei
2016/08/29 08:27:47
Done.
| |
| 298 | |
| 295 DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImpl); | 299 DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImpl); |
| 296 }; | 300 }; |
| 297 | 301 |
| 298 } // namespace input_method | 302 } // namespace input_method |
| 299 } // namespace chromeos | 303 } // namespace chromeos |
| 300 | 304 |
| 301 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ | 305 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ |
| OLD | NEW |