| 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_delegate.h" | 5 #include "chrome/browser/chromeos/input_method/mock_input_method_delegate.h" |
| 6 | 6 |
| 7 namespace chromeos { | 7 namespace chromeos { |
| 8 namespace input_method { | 8 namespace input_method { |
| 9 | 9 |
| 10 MockInputMethodDelegate::MockInputMethodDelegate() | 10 MockInputMethodDelegate::MockInputMethodDelegate() |
| 11 : active_locale_("en"), | 11 : active_locale_("en") { |
| 12 update_system_input_method_count_(0), | |
| 13 update_user_input_method_count_(0) { | |
| 14 } | 12 } |
| 15 | 13 |
| 16 MockInputMethodDelegate::~MockInputMethodDelegate() { | 14 MockInputMethodDelegate::~MockInputMethodDelegate() { |
| 17 } | 15 } |
| 18 | 16 |
| 19 void MockInputMethodDelegate::SetSystemInputMethod( | |
| 20 const std::string& input_method) { | |
| 21 ++update_system_input_method_count_; | |
| 22 system_input_method_ = input_method; | |
| 23 } | |
| 24 | |
| 25 void MockInputMethodDelegate::SetUserInputMethod( | |
| 26 const std::string& input_method) { | |
| 27 ++update_user_input_method_count_; | |
| 28 user_input_method_ = input_method; | |
| 29 } | |
| 30 | |
| 31 std::string MockInputMethodDelegate::GetHardwareKeyboardLayout() const { | 17 std::string MockInputMethodDelegate::GetHardwareKeyboardLayout() const { |
| 32 return hardware_keyboard_layout_; | 18 return hardware_keyboard_layout_; |
| 33 } | 19 } |
| 34 | 20 |
| 35 std::string MockInputMethodDelegate::GetActiveLocale() const { | 21 std::string MockInputMethodDelegate::GetActiveLocale() const { |
| 36 return active_locale_; | 22 return active_locale_; |
| 37 } | 23 } |
| 38 | 24 |
| 39 } // namespace input_method | 25 } // namespace input_method |
| 40 } // namespace chromeos | 26 } // namespace chromeos |
| OLD | NEW |