Chromium Code Reviews| 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..56a1ddec9ff9030c8a60389c7f286d30c93a2032 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_(~0) { |
|
James Cook
2017/06/29 16:48:29
nit: add an enum value like
FEATURE_ALL = ~0
and
Azure Wei
2017/06/30 03:09:37
Done.
|
| 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 |