| 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 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 namespace chromeos { | 9 namespace chromeos { |
| 10 namespace input_method { | 10 namespace input_method { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 ++remove_observer_count_; | 49 ++remove_observer_count_; |
| 50 } | 50 } |
| 51 | 51 |
| 52 void MockInputMethodManager::RemoveCandidateWindowObserver( | 52 void MockInputMethodManager::RemoveCandidateWindowObserver( |
| 53 InputMethodManager::CandidateWindowObserver* observer) { | 53 InputMethodManager::CandidateWindowObserver* observer) { |
| 54 } | 54 } |
| 55 | 55 |
| 56 void MockInputMethodManager::RemoveImeMenuObserver( | 56 void MockInputMethodManager::RemoveImeMenuObserver( |
| 57 InputMethodManager::ImeMenuObserver* observer) {} | 57 InputMethodManager::ImeMenuObserver* observer) {} |
| 58 | 58 |
| 59 scoped_ptr<InputMethodDescriptors> | 59 std::unique_ptr<InputMethodDescriptors> |
| 60 MockInputMethodManager::GetSupportedInputMethods() const { | 60 MockInputMethodManager::GetSupportedInputMethods() const { |
| 61 scoped_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); | 61 std::unique_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); |
| 62 result->push_back( | 62 result->push_back( |
| 63 InputMethodUtil::GetFallbackInputMethodDescriptor()); | 63 InputMethodUtil::GetFallbackInputMethodDescriptor()); |
| 64 return result; | 64 return result; |
| 65 } | 65 } |
| 66 | 66 |
| 67 scoped_ptr<InputMethodDescriptors> | 67 std::unique_ptr<InputMethodDescriptors> |
| 68 MockInputMethodManager::State::GetActiveInputMethods() const { | 68 MockInputMethodManager::State::GetActiveInputMethods() const { |
| 69 scoped_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); | 69 std::unique_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); |
| 70 result->push_back( | 70 result->push_back( |
| 71 InputMethodUtil::GetFallbackInputMethodDescriptor()); | 71 InputMethodUtil::GetFallbackInputMethodDescriptor()); |
| 72 return result; | 72 return result; |
| 73 } | 73 } |
| 74 | 74 |
| 75 const std::vector<std::string>& | 75 const std::vector<std::string>& |
| 76 MockInputMethodManager::State::GetActiveInputMethodIds() const { | 76 MockInputMethodManager::State::GetActiveInputMethodIds() const { |
| 77 return active_input_method_ids; | 77 return active_input_method_ids; |
| 78 } | 78 } |
| 79 | 79 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 InputMethodUtil* MockInputMethodManager::GetInputMethodUtil() { | 195 InputMethodUtil* MockInputMethodManager::GetInputMethodUtil() { |
| 196 return &util_; | 196 return &util_; |
| 197 } | 197 } |
| 198 | 198 |
| 199 ComponentExtensionIMEManager* | 199 ComponentExtensionIMEManager* |
| 200 MockInputMethodManager::GetComponentExtensionIMEManager() { | 200 MockInputMethodManager::GetComponentExtensionIMEManager() { |
| 201 return comp_ime_manager_.get(); | 201 return comp_ime_manager_.get(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void MockInputMethodManager::SetComponentExtensionIMEManager( | 204 void MockInputMethodManager::SetComponentExtensionIMEManager( |
| 205 scoped_ptr<ComponentExtensionIMEManager> comp_ime_manager) { | 205 std::unique_ptr<ComponentExtensionIMEManager> comp_ime_manager) { |
| 206 comp_ime_manager_ = std::move(comp_ime_manager); | 206 comp_ime_manager_ = std::move(comp_ime_manager); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void MockInputMethodManager::set_application_locale(const std::string& value) { | 209 void MockInputMethodManager::set_application_locale(const std::string& value) { |
| 210 delegate_.set_active_locale(value); | 210 delegate_.set_active_locale(value); |
| 211 } | 211 } |
| 212 | 212 |
| 213 bool MockInputMethodManager::IsLoginKeyboard( | 213 bool MockInputMethodManager::IsLoginKeyboard( |
| 214 const std::string& layout) const { | 214 const std::string& layout) const { |
| 215 return true; | 215 return true; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 state_->current_input_method_id = input_method_id; | 247 state_->current_input_method_id = input_method_id; |
| 248 } | 248 } |
| 249 | 249 |
| 250 void MockInputMethodManager::ImeMenuActivationChanged(bool is_active) {} | 250 void MockInputMethodManager::ImeMenuActivationChanged(bool is_active) {} |
| 251 | 251 |
| 252 void MockInputMethodManager::NotifyImeMenuItemsChanged( | 252 void MockInputMethodManager::NotifyImeMenuItemsChanged( |
| 253 const std::string& engine_id, | 253 const std::string& engine_id, |
| 254 const std::vector<InputMethodManager::MenuItem>& items) {} | 254 const std::vector<InputMethodManager::MenuItem>& items) {} |
| 255 } // namespace input_method | 255 } // namespace input_method |
| 256 } // namespace chromeos | 256 } // namespace chromeos |
| OLD | NEW |