| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 std::string label; | 57 std::string label; |
| 58 MenuItemStyle style; | 58 MenuItemStyle style; |
| 59 bool visible; | 59 bool visible; |
| 60 bool enabled; | 60 bool enabled; |
| 61 bool checked; | 61 bool checked; |
| 62 | 62 |
| 63 unsigned int modified; | 63 unsigned int modified; |
| 64 std::vector<MenuItem> children; | 64 std::vector<MenuItem> children; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 enum ImeMenuFeature { |
| 68 FEATURE_EMOJI = 1 << 0, |
| 69 FEATURE_HANDWRITING = 1 << 1, |
| 70 FEATURE_VOICE = 1 << 2, |
| 71 }; |
| 72 |
| 67 class Observer { | 73 class Observer { |
| 68 public: | 74 public: |
| 69 virtual ~Observer() {} | 75 virtual ~Observer() {} |
| 70 // Called when the current input method is changed. |show_message| | 76 // Called when the current input method is changed. |show_message| |
| 71 // indicates whether the user should be notified of this change. | 77 // indicates whether the user should be notified of this change. |
| 72 virtual void InputMethodChanged(InputMethodManager* manager, | 78 virtual void InputMethodChanged(InputMethodManager* manager, |
| 73 Profile* profile, | 79 Profile* profile, |
| 74 bool show_message) = 0; | 80 bool show_message) = 0; |
| 75 }; | 81 }; |
| 76 | 82 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 virtual void MaybeNotifyImeMenuActivationChanged() = 0; | 305 virtual void MaybeNotifyImeMenuActivationChanged() = 0; |
| 300 | 306 |
| 301 // Overrides the keyboard url ref (stuff following '#' to the end of the | 307 // Overrides the keyboard url ref (stuff following '#' to the end of the |
| 302 // string) with the given keyset (emoji, hwt or voice). If |keyset| is empty, | 308 // string) with the given keyset (emoji, hwt or voice). If |keyset| is empty, |
| 303 // it indicates that we should override the url back with the keyboard keyset. | 309 // it indicates that we should override the url back with the keyboard keyset. |
| 304 virtual void OverrideKeyboardUrlRef(const std::string& keyset) = 0; | 310 virtual void OverrideKeyboardUrlRef(const std::string& keyset) = 0; |
| 305 | 311 |
| 306 // Returns whether the extra inputs: emoji, handwriting and voice inputs on | 312 // Returns whether the extra inputs: emoji, handwriting and voice inputs on |
| 307 // opt-in IME menu has been enabled. | 313 // opt-in IME menu has been enabled. |
| 308 virtual bool IsEmojiHandwritingVoiceOnImeMenuEnabled() = 0; | 314 virtual bool IsEmojiHandwritingVoiceOnImeMenuEnabled() = 0; |
| 315 |
| 316 // Enables or disables some advanced features, e.g. handwiring, voices input. |
| 317 virtual void SetImeMenuFeatureEnabled(ImeMenuFeature feature, |
| 318 bool enabled) = 0; |
| 319 |
| 320 // Returns the true if the given feature is enabled. |
| 321 virtual bool GetImeMenuFeatureEnabled(ImeMenuFeature feature) const = 0; |
| 309 }; | 322 }; |
| 310 | 323 |
| 311 } // namespace input_method | 324 } // namespace input_method |
| 312 } // namespace chromeos | 325 } // namespace chromeos |
| 313 | 326 |
| 314 #endif // UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ | 327 #endif // UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ |
| OLD | NEW |