| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_DELEGATE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" |
| 12 #include "chrome/browser/chromeos/input_method/input_method_delegate.h" |
| 13 |
| 14 namespace chromeos { |
| 15 namespace input_method { |
| 16 |
| 17 class MockInputMethodDelegate : public InputMethodDelegate { |
| 18 public: |
| 19 MockInputMethodDelegate(); |
| 20 virtual ~MockInputMethodDelegate(); |
| 21 |
| 22 // 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; |
| 27 virtual std::string GetActiveLocale() const OVERRIDE; |
| 28 |
| 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) { |
| 38 hardware_keyboard_layout_ = value; |
| 39 } |
| 40 |
| 41 void set_active_locale(const std::string& value) { |
| 42 active_locale_ = value; |
| 43 } |
| 44 |
| 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: |
| 54 std::string hardware_keyboard_layout_; |
| 55 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); |
| 63 }; |
| 64 |
| 65 } // namespace input_method |
| 66 } // namespace chromeos |
| 67 |
| 68 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_DELEGATE_H_ |
| OLD | NEW |