| 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 "chrome/browser/chromeos/input_method/mock_input_method_manager.h" | 5 #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" |
| 6 | 6 |
| 7 namespace chromeos { | 7 namespace chromeos { |
| 8 namespace input_method { | 8 namespace input_method { |
| 9 | 9 |
| 10 MockInputMethodManager::MockInputMethodManager() | 10 MockInputMethodManager::MockInputMethodManager() |
| 11 : add_observer_count_(0), | 11 : add_observer_count_(0), |
| 12 remove_observer_count_(0), | 12 remove_observer_count_(0), |
| 13 util_(&delegate_, whitelist_.GetSupportedInputMethods()) { | 13 util_(&delegate_, whitelist_.GetSupportedInputMethods()), |
| 14 mod3_used_(false) { |
| 14 active_input_method_ids_.push_back("xkb:us::eng"); | 15 active_input_method_ids_.push_back("xkb:us::eng"); |
| 15 } | 16 } |
| 16 | 17 |
| 17 MockInputMethodManager::~MockInputMethodManager() { | 18 MockInputMethodManager::~MockInputMethodManager() { |
| 18 } | 19 } |
| 19 | 20 |
| 20 void MockInputMethodManager::AddObserver( | 21 void MockInputMethodManager::AddObserver( |
| 21 InputMethodManager::Observer* observer) { | 22 InputMethodManager::Observer* observer) { |
| 22 ++add_observer_count_; | 23 ++add_observer_count_; |
| 23 } | 24 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 descriptor.indicator(), | 138 descriptor.indicator(), |
| 138 descriptor.keyboard_layouts(), | 139 descriptor.keyboard_layouts(), |
| 139 descriptor.language_codes(), | 140 descriptor.language_codes(), |
| 140 true, | 141 true, |
| 141 GURL(), // options page url. | 142 GURL(), // options page url. |
| 142 GURL()); // input view page url. | 143 GURL()); // input view page url. |
| 143 } | 144 } |
| 144 return descriptor; | 145 return descriptor; |
| 145 } | 146 } |
| 146 | 147 |
| 148 bool MockInputMethodManager::IsISOLevel5ShiftUsedByCurrentInputMethod() const { |
| 149 return mod3_used_; |
| 150 } |
| 151 |
| 152 bool MockInputMethodManager::IsAltGrUsedByCurrentInputMethod() const { |
| 153 return false; |
| 154 } |
| 155 |
| 147 XKeyboard* MockInputMethodManager::GetXKeyboard() { | 156 XKeyboard* MockInputMethodManager::GetXKeyboard() { |
| 148 return &xkeyboard_; | 157 return &xkeyboard_; |
| 149 } | 158 } |
| 150 | 159 |
| 151 InputMethodUtil* MockInputMethodManager::GetInputMethodUtil() { | 160 InputMethodUtil* MockInputMethodManager::GetInputMethodUtil() { |
| 152 return &util_; | 161 return &util_; |
| 153 } | 162 } |
| 154 | 163 |
| 155 ComponentExtensionIMEManager* | 164 ComponentExtensionIMEManager* |
| 156 MockInputMethodManager::GetComponentExtensionIMEManager() { | 165 MockInputMethodManager::GetComponentExtensionIMEManager() { |
| 157 return NULL; | 166 return NULL; |
| 158 } | 167 } |
| 159 | 168 |
| 160 void MockInputMethodManager::set_application_locale(const std::string& value) { | 169 void MockInputMethodManager::set_application_locale(const std::string& value) { |
| 161 delegate_.set_active_locale(value); | 170 delegate_.set_active_locale(value); |
| 162 } | 171 } |
| 163 | 172 |
| 164 bool MockInputMethodManager::IsLoginKeyboard( | 173 bool MockInputMethodManager::IsLoginKeyboard( |
| 165 const std::string& layout) const { | 174 const std::string& layout) const { |
| 166 return true; | 175 return true; |
| 167 } | 176 } |
| 168 | 177 |
| 169 bool MockInputMethodManager::MigrateXkbInputMethods( | 178 bool MockInputMethodManager::MigrateXkbInputMethods( |
| 170 std::vector<std::string>* input_method_ids) { | 179 std::vector<std::string>* input_method_ids) { |
| 171 return false; | 180 return false; |
| 172 } | 181 } |
| 173 | 182 |
| 174 } // namespace input_method | 183 } // namespace input_method |
| 175 } // namespace chromeos | 184 } // namespace chromeos |
| OLD | NEW |