| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/base/ime/chromeos/mock_input_method_manager.h" | 5 #include "ui/base/ime/chromeos/mock_input_method_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 namespace chromeos { | 9 namespace chromeos { |
| 10 namespace input_method { | 10 namespace input_method { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 return true; | 92 return true; |
| 93 } | 93 } |
| 94 | 94 |
| 95 const std::vector<std::string>& | 95 const std::vector<std::string>& |
| 96 MockInputMethodManager::State::GetAllowedInputMethods() { | 96 MockInputMethodManager::State::GetAllowedInputMethods() { |
| 97 return allowed_input_method_ids_; | 97 return allowed_input_method_ids_; |
| 98 } | 98 } |
| 99 | 99 |
| 100 MockInputMethodManager::State::~State() {} | 100 MockInputMethodManager::State::~State() {} |
| 101 | 101 |
| 102 MockInputMethodManager::MockInputMethodManager() {} | 102 MockInputMethodManager::MockInputMethodManager() |
| 103 : features_enabled_state_(InputMethodManager::FEATURE_ALL) {} |
| 103 | 104 |
| 104 MockInputMethodManager::~MockInputMethodManager() {} | 105 MockInputMethodManager::~MockInputMethodManager() {} |
| 105 | 106 |
| 106 InputMethodManager::UISessionState MockInputMethodManager::GetUISessionState() { | 107 InputMethodManager::UISessionState MockInputMethodManager::GetUISessionState() { |
| 107 return InputMethodManager::STATE_BROWSER_SCREEN; | 108 return InputMethodManager::STATE_BROWSER_SCREEN; |
| 108 } | 109 } |
| 109 | 110 |
| 110 void MockInputMethodManager::AddObserver( | 111 void MockInputMethodManager::AddObserver( |
| 111 InputMethodManager::Observer* observer) {} | 112 InputMethodManager::Observer* observer) {} |
| 112 | 113 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 184 |
| 184 void MockInputMethodManager::MaybeNotifyImeMenuActivationChanged() {} | 185 void MockInputMethodManager::MaybeNotifyImeMenuActivationChanged() {} |
| 185 | 186 |
| 186 void MockInputMethodManager::OverrideKeyboardUrlRef(const std::string& keyset) { | 187 void MockInputMethodManager::OverrideKeyboardUrlRef(const std::string& keyset) { |
| 187 } | 188 } |
| 188 | 189 |
| 189 bool MockInputMethodManager::IsEmojiHandwritingVoiceOnImeMenuEnabled() { | 190 bool MockInputMethodManager::IsEmojiHandwritingVoiceOnImeMenuEnabled() { |
| 190 return true; | 191 return true; |
| 191 } | 192 } |
| 192 | 193 |
| 194 void MockInputMethodManager::SetImeMenuFeatureEnabled(ImeMenuFeature feature, |
| 195 bool enabled) { |
| 196 if (enabled) |
| 197 features_enabled_state_ |= feature; |
| 198 else |
| 199 features_enabled_state_ &= ~feature; |
| 200 } |
| 201 |
| 202 bool MockInputMethodManager::GetImeMenuFeatureEnabled( |
| 203 ImeMenuFeature feature) const { |
| 204 return features_enabled_state_ & feature; |
| 205 } |
| 206 |
| 193 } // namespace input_method | 207 } // namespace input_method |
| 194 } // namespace chromeos | 208 } // namespace chromeos |
| OLD | NEW |