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 UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ | 5 #ifndef UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ |
6 #define UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ | 6 #define UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 virtual void SwitchInputMethod(const ui::Accelerator& accelerator) = 0; | 206 virtual void SwitchInputMethod(const ui::Accelerator& accelerator) = 0; |
207 | 207 |
208 // Gets the descriptor of the input method which is currently selected. | 208 // Gets the descriptor of the input method which is currently selected. |
209 virtual InputMethodDescriptor GetCurrentInputMethod() const = 0; | 209 virtual InputMethodDescriptor GetCurrentInputMethod() const = 0; |
210 | 210 |
211 // Updates the list of active input method IDs, and then starts or stops the | 211 // Updates the list of active input method IDs, and then starts or stops the |
212 // system input method framework as needed. | 212 // system input method framework as needed. |
213 virtual bool ReplaceEnabledInputMethods( | 213 virtual bool ReplaceEnabledInputMethods( |
214 const std::vector<std::string>& new_active_input_method_ids) = 0; | 214 const std::vector<std::string>& new_active_input_method_ids) = 0; |
215 | 215 |
| 216 // Sets the currently allowed keyboard layout input methods (e.g. due to |
| 217 // policy). Invalid input method ids are ignored. Passing an empty vector |
| 218 // means that all keyboard layout input methods are allowed, which is the |
| 219 // default. |
| 220 // When allowed input methods are set, these are also automatically enabled. |
| 221 virtual bool SetAllowedKeyboardLayoutInputMethods( |
| 222 const std::vector<std::string>& allowed_input_method_ids) = 0; |
| 223 |
| 224 // Returns the currently allowed keyboard layout input methods, as set by |
| 225 // SetAllowedKeyboardLayoutInputMethodIds. |
| 226 virtual const std::vector<std::string>& |
| 227 GetAllowedKeyboardLayoutInputMethods() = 0; |
| 228 |
216 protected: | 229 protected: |
217 friend base::RefCounted<InputMethodManager::State>; | 230 friend base::RefCounted<InputMethodManager::State>; |
218 | 231 |
219 virtual ~State(); | 232 virtual ~State(); |
220 }; | 233 }; |
221 | 234 |
222 virtual ~InputMethodManager() {} | 235 virtual ~InputMethodManager() {} |
223 | 236 |
224 // Gets the global instance of InputMethodManager. Initialize() must be called | 237 // Gets the global instance of InputMethodManager. Initialize() must be called |
225 // first. | 238 // first. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 320 |
308 // Returns whether the extra inputs: emoji, handwriting and voice inputs on | 321 // Returns whether the extra inputs: emoji, handwriting and voice inputs on |
309 // opt-in IME menu has been enabled. | 322 // opt-in IME menu has been enabled. |
310 virtual bool IsEmojiHandwritingVoiceOnImeMenuEnabled() = 0; | 323 virtual bool IsEmojiHandwritingVoiceOnImeMenuEnabled() = 0; |
311 }; | 324 }; |
312 | 325 |
313 } // namespace input_method | 326 } // namespace input_method |
314 } // namespace chromeos | 327 } // namespace chromeos |
315 | 328 |
316 #endif // UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ | 329 #endif // UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ |
OLD | NEW |