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

Unified Diff: ui/base/ime/chromeos/mock_input_method_manager.cc

Issue 2953033002: Hide handwriting and voice buttons when keyboard is in restricted state (Closed)
Patch Set: Add FEATURE_ALL 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
« no previous file with comments | « ui/base/ime/chromeos/mock_input_method_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/chromeos/mock_input_method_manager.cc
diff --git a/ui/base/ime/chromeos/mock_input_method_manager.cc b/ui/base/ime/chromeos/mock_input_method_manager.cc
index f40d0798e6df7b891f2ceba343bd19e2e2e42805..a66aeeb21f31d404a72423433e542ce84a7e1c9e 100644
--- a/ui/base/ime/chromeos/mock_input_method_manager.cc
+++ b/ui/base/ime/chromeos/mock_input_method_manager.cc
@@ -99,7 +99,8 @@ MockInputMethodManager::State::GetAllowedInputMethods() {
MockInputMethodManager::State::~State() {}
-MockInputMethodManager::MockInputMethodManager() {}
+MockInputMethodManager::MockInputMethodManager()
+ : features_enabled_state_(InputMethodManager::FEATURE_ALL) {}
MockInputMethodManager::~MockInputMethodManager() {}
@@ -190,5 +191,18 @@ bool MockInputMethodManager::IsEmojiHandwritingVoiceOnImeMenuEnabled() {
return true;
}
+void MockInputMethodManager::SetImeMenuFeatureEnabled(ImeMenuFeature feature,
+ bool enabled) {
+ if (enabled)
+ features_enabled_state_ |= feature;
+ else
+ features_enabled_state_ &= ~feature;
+}
+
+bool MockInputMethodManager::GetImeMenuFeatureEnabled(
+ ImeMenuFeature feature) const {
+ return features_enabled_state_ & feature;
+}
+
} // namespace input_method
} // namespace chromeos
« no previous file with comments | « ui/base/ime/chromeos/mock_input_method_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698