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

Unified 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: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/ime/chromeos/input_method_manager.h
diff --git a/ui/base/ime/chromeos/input_method_manager.h b/ui/base/ime/chromeos/input_method_manager.h
index 2ad022ddf63351a5098debb687538c34c4e8a0c0..d14e6339d3ac0a084fe72ff747098522956f5756 100644
--- a/ui/base/ime/chromeos/input_method_manager.h
+++ b/ui/base/ime/chromeos/input_method_manager.h
@@ -65,6 +65,13 @@ class UI_BASE_IME_EXPORT InputMethodManager {
std::vector<MenuItem> children;
};
+ enum FeaturesRestricted {
+ NONE = 0,
+ EMOJI = 1 << 0,
James Cook 2017/06/27 16:31:11 If you use enum instead of enum class these should
Azure Wei 2017/06/29 16:37:03 Done.
+ HANDWRITING = 1 << 1,
+ VOICE = 1 << 2,
+ };
+
class Observer {
public:
virtual ~Observer() {}
@@ -320,6 +327,14 @@ class UI_BASE_IME_EXPORT InputMethodManager {
// Returns whether the extra inputs: emoji, handwriting and voice inputs on
// opt-in IME menu has been enabled.
virtual bool IsEmojiHandwritingVoiceOnImeMenuEnabled() = 0;
James Cook 2017/06/27 16:31:11 This function partially duplicates GetFeaturesRest
Azure Wei 2017/06/29 16:37:03 This is a different condition. IsEmojiHandwritingV
+
+ // Sets some advanced features, e.g. handwiring, voices input, in restricted
+ // state.
+ virtual void SetFeaturesRestricted(FeaturesRestricted feature,
James Cook 2017/06/27 16:31:11 Please use positive sense booleans, so SetFeatureE
Azure Wei 2017/06/29 16:37:03 Done.
+ bool restricted) = 0;
+
+ // Returns the restricted state of the given keyboard feature.
+ virtual bool GetFeaturesRestricted(FeaturesRestricted feature) const = 0;
James Cook 2017/06/27 16:31:11 GetFeatureEnabled() or GetImeMenuFeatureEnabled()
Azure Wei 2017/06/29 16:37:03 Done.
};
} // namespace input_method

Powered by Google App Engine
This is Rietveld 408576698