| 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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 12 #include "chrome/browser/chromeos/input_method/input_method_delegate.h" | 10 #include "chrome/browser/chromeos/input_method/input_method_delegate.h" |
| 13 | 11 |
| 14 namespace chromeos { | 12 namespace chromeos { |
| 15 namespace input_method { | 13 namespace input_method { |
| 16 | 14 |
| 17 class MockInputMethodDelegate : public InputMethodDelegate { | 15 class MockInputMethodDelegate : public InputMethodDelegate { |
| 18 public: | 16 public: |
| 19 MockInputMethodDelegate(); | 17 MockInputMethodDelegate(); |
| 20 virtual ~MockInputMethodDelegate(); | 18 virtual ~MockInputMethodDelegate(); |
| 21 | 19 |
| 22 // InputMethodDelegate implementation: | 20 // InputMethodDelegate implementation: |
| 23 virtual void SetSystemInputMethod( | |
| 24 const std::string& input_method) OVERRIDE; | |
| 25 virtual void SetUserInputMethod(const std::string& input_method) OVERRIDE; | |
| 26 virtual std::string GetHardwareKeyboardLayout() const OVERRIDE; | 21 virtual std::string GetHardwareKeyboardLayout() const OVERRIDE; |
| 27 virtual std::string GetActiveLocale() const OVERRIDE; | 22 virtual std::string GetActiveLocale() const OVERRIDE; |
| 28 | 23 |
| 29 int update_system_input_method_count() const { | |
| 30 return update_system_input_method_count_; | |
| 31 } | |
| 32 | |
| 33 int update_user_input_method_count() const { | |
| 34 return update_user_input_method_count_; | |
| 35 } | |
| 36 | |
| 37 void set_hardware_keyboard_layout(const std::string& value) { | 24 void set_hardware_keyboard_layout(const std::string& value) { |
| 38 hardware_keyboard_layout_ = value; | 25 hardware_keyboard_layout_ = value; |
| 39 } | 26 } |
| 40 | 27 |
| 41 void set_active_locale(const std::string& value) { | 28 void set_active_locale(const std::string& value) { |
| 42 active_locale_ = value; | 29 active_locale_ = value; |
| 43 } | 30 } |
| 44 | 31 |
| 45 const std::string& system_input_method() const { | |
| 46 return system_input_method_; | |
| 47 } | |
| 48 | |
| 49 const std::string& user_input_method() const { | |
| 50 return user_input_method_; | |
| 51 } | |
| 52 | |
| 53 private: | 32 private: |
| 54 std::string hardware_keyboard_layout_; | 33 std::string hardware_keyboard_layout_; |
| 55 std::string active_locale_; | 34 std::string active_locale_; |
| 56 std::string system_input_method_; | |
| 57 std::string user_input_method_; | |
| 58 | |
| 59 int update_system_input_method_count_; | |
| 60 int update_user_input_method_count_; | |
| 61 | |
| 62 DISALLOW_COPY_AND_ASSIGN(MockInputMethodDelegate); | 35 DISALLOW_COPY_AND_ASSIGN(MockInputMethodDelegate); |
| 63 }; | 36 }; |
| 64 | 37 |
| 65 } // namespace input_method | 38 } // namespace input_method |
| 66 } // namespace chromeos | 39 } // namespace chromeos |
| 67 | 40 |
| 68 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_DELEGATE_H_ | 41 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_DELEGATE_H_ |
| OLD | NEW |