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

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.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
Index: chrome/browser/chromeos/input_method/input_method_manager_impl.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
index 4c74e466eddc23dc55a9b84548cc256b0a8a826f..3b1302ff906d2bbd83a1e03d64e61d125e98ce45 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
@@ -859,7 +859,8 @@ InputMethodManagerImpl::InputMethodManagerImpl(
util_(delegate_.get()),
component_extension_ime_manager_(new ComponentExtensionIMEManager()),
enable_extension_loading_(enable_extension_loading),
- is_ime_menu_activated_(false) {
+ is_ime_menu_activated_(false),
+ features_enabled_state_(InputMethodManager::FEATURE_ALL) {
if (IsRunningAsSystemCompositor()) {
#if defined(USE_OZONE)
keyboard_ = base::MakeUnique<ImeKeyboardMus>(
@@ -1275,5 +1276,18 @@ bool InputMethodManagerImpl::IsEmojiHandwritingVoiceOnImeMenuEnabled() {
return base::FeatureList::IsEnabled(features::kEHVInputOnImeMenu);
}
+void InputMethodManagerImpl::SetImeMenuFeatureEnabled(ImeMenuFeature feature,
+ bool enabled) {
+ if (enabled)
+ features_enabled_state_ |= feature;
+ else
+ features_enabled_state_ &= ~feature;
+}
+
+bool InputMethodManagerImpl::GetImeMenuFeatureEnabled(
+ ImeMenuFeature feature) const {
+ return features_enabled_state_ & feature;
+}
+
} // namespace input_method
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698