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

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 InputMethodManager::FeaturesRestrictedState 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/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 a28f490ee098993c70e1c5a2aabae56138a1d6ba..39d56100d6eae98e8938bb8e2b81bd59a46f1436 100644
--- a/ui/base/ime/chromeos/mock_input_method_manager.cc
+++ b/ui/base/ime/chromeos/mock_input_method_manager.cc
@@ -111,7 +111,8 @@ MockInputMethodManager::State::GetAllowedInputMethods() {
MockInputMethodManager::State::~State() {}
-MockInputMethodManager::MockInputMethodManager() {}
+MockInputMethodManager::MockInputMethodManager()
+ : features_restricted_state_(FeaturesRestrictedState::RESTRICTED_NONE) {}
MockInputMethodManager::~MockInputMethodManager() {}
@@ -202,5 +203,19 @@ bool MockInputMethodManager::IsEmojiHandwritingVoiceOnImeMenuEnabled() {
return true;
}
+void MockInputMethodManager::SetFeaturesRestrictedState(
+ FeaturesRestrictedState feature,
+ bool restricted) {
+ if (restricted) {
+ features_restricted_state_ |= feature;
+ } else {
+ features_restricted_state_ &= (~feature);
+ }
+}
+
+uint32_t MockInputMethodManager::GetFeaturesRestrictedState() {
+ return features_restricted_state_;
+}
+
} // namespace input_method
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698