Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: ui/base/ime/chromeos/input_method_manager.h

Issue 2953033002: Hide handwriting and voice buttons when keyboard is in restricted state (Closed)
Patch Set: Add FEATURE_ALL Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 FEATURE_ALL = ~0,
72 };
73
67 class Observer { 74 class Observer {
68 public: 75 public:
69 virtual ~Observer() {} 76 virtual ~Observer() {}
70 // Called when the current input method is changed. |show_message| 77 // Called when the current input method is changed. |show_message|
71 // indicates whether the user should be notified of this change. 78 // indicates whether the user should be notified of this change.
72 virtual void InputMethodChanged(InputMethodManager* manager, 79 virtual void InputMethodChanged(InputMethodManager* manager,
73 Profile* profile, 80 Profile* profile,
74 bool show_message) = 0; 81 bool show_message) = 0;
75 }; 82 };
76 83
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 virtual void MaybeNotifyImeMenuActivationChanged() = 0; 306 virtual void MaybeNotifyImeMenuActivationChanged() = 0;
300 307
301 // Overrides the keyboard url ref (stuff following '#' to the end of the 308 // 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, 309 // 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. 310 // it indicates that we should override the url back with the keyboard keyset.
304 virtual void OverrideKeyboardUrlRef(const std::string& keyset) = 0; 311 virtual void OverrideKeyboardUrlRef(const std::string& keyset) = 0;
305 312
306 // Returns whether the extra inputs: emoji, handwriting and voice inputs on 313 // Returns whether the extra inputs: emoji, handwriting and voice inputs on
307 // opt-in IME menu has been enabled. 314 // opt-in IME menu has been enabled.
308 virtual bool IsEmojiHandwritingVoiceOnImeMenuEnabled() = 0; 315 virtual bool IsEmojiHandwritingVoiceOnImeMenuEnabled() = 0;
316
317 // Enables or disables some advanced features, e.g. handwiring, voices input.
318 virtual void SetImeMenuFeatureEnabled(ImeMenuFeature feature,
319 bool enabled) = 0;
320
321 // Returns the true if the given feature is enabled.
322 virtual bool GetImeMenuFeatureEnabled(ImeMenuFeature feature) const = 0;
309 }; 323 };
310 324
311 } // namespace input_method 325 } // namespace input_method
312 } // namespace chromeos 326 } // namespace chromeos
313 327
314 #endif // UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ 328 #endif // UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/virtual_keyboard/virtual_keyboard_api.cc ('k') | ui/base/ime/chromeos/mock_input_method_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698