| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 void MockInputMethodManager::AddObserver( | 35 void MockInputMethodManager::AddObserver( |
| 36 InputMethodManager::Observer* observer) { | 36 InputMethodManager::Observer* observer) { |
| 37 ++add_observer_count_; | 37 ++add_observer_count_; |
| 38 } | 38 } |
| 39 | 39 |
| 40 void MockInputMethodManager::AddCandidateWindowObserver( | 40 void MockInputMethodManager::AddCandidateWindowObserver( |
| 41 InputMethodManager::CandidateWindowObserver* observer) { | 41 InputMethodManager::CandidateWindowObserver* observer) { |
| 42 } | 42 } |
| 43 | 43 |
| 44 void MockInputMethodManager::AddImeMenuObserver( |
| 45 InputMethodManager::ImeMenuObserver* observer) {} |
| 46 |
| 44 void MockInputMethodManager::RemoveObserver( | 47 void MockInputMethodManager::RemoveObserver( |
| 45 InputMethodManager::Observer* observer) { | 48 InputMethodManager::Observer* observer) { |
| 46 ++remove_observer_count_; | 49 ++remove_observer_count_; |
| 47 } | 50 } |
| 48 | 51 |
| 49 void MockInputMethodManager::RemoveCandidateWindowObserver( | 52 void MockInputMethodManager::RemoveCandidateWindowObserver( |
| 50 InputMethodManager::CandidateWindowObserver* observer) { | 53 InputMethodManager::CandidateWindowObserver* observer) { |
| 51 } | 54 } |
| 52 | 55 |
| 56 void MockInputMethodManager::RemoveImeMenuObserver( |
| 57 InputMethodManager::ImeMenuObserver* observer) {} |
| 58 |
| 53 scoped_ptr<InputMethodDescriptors> | 59 scoped_ptr<InputMethodDescriptors> |
| 54 MockInputMethodManager::GetSupportedInputMethods() const { | 60 MockInputMethodManager::GetSupportedInputMethods() const { |
| 55 scoped_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); | 61 scoped_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); |
| 56 result->push_back( | 62 result->push_back( |
| 57 InputMethodUtil::GetFallbackInputMethodDescriptor()); | 63 InputMethodUtil::GetFallbackInputMethodDescriptor()); |
| 58 return result; | 64 return result; |
| 59 } | 65 } |
| 60 | 66 |
| 61 scoped_ptr<InputMethodDescriptors> | 67 scoped_ptr<InputMethodDescriptors> |
| 62 MockInputMethodManager::State::GetActiveInputMethods() const { | 68 MockInputMethodManager::State::GetActiveInputMethods() const { |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 scoped_refptr<InputMethodManager::State> state) { | 240 scoped_refptr<InputMethodManager::State> state) { |
| 235 state_ = scoped_refptr<MockInputMethodManager::State>( | 241 state_ = scoped_refptr<MockInputMethodManager::State>( |
| 236 static_cast<MockInputMethodManager::State*>(state.get())); | 242 static_cast<MockInputMethodManager::State*>(state.get())); |
| 237 } | 243 } |
| 238 | 244 |
| 239 void MockInputMethodManager::SetCurrentInputMethodId( | 245 void MockInputMethodManager::SetCurrentInputMethodId( |
| 240 const std::string& input_method_id) { | 246 const std::string& input_method_id) { |
| 241 state_->current_input_method_id = input_method_id; | 247 state_->current_input_method_id = input_method_id; |
| 242 } | 248 } |
| 243 | 249 |
| 250 void MockInputMethodManager::ImeMenuActivationChanged(bool activation) {} |
| 251 |
| 244 } // namespace input_method | 252 } // namespace input_method |
| 245 } // namespace chromeos | 253 } // namespace chromeos |
| OLD | NEW |