Chromium Code Reviews| 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 virtual void SetSystemInputMethod( | |
| 22 const std::string& input_method) OVERRIDE; | |
| 23 | |
| 24 virtual void SetUserInputMethod(const std::string& input_method) OVERRIDE; | |
|
Seigo Nonaka
2012/12/08 08:37:58
Nit: plz add override comment like "InputMethodDel
| |
| 25 | |
| 26 virtual std::string GetHardwareKeyboardLayout() const OVERRIDE; | |
| 27 | |
| 28 virtual std::string GetActiveLocale() const OVERRIDE; | |
| 29 | |
| 30 int update_system_input_method_count() const { | |
| 31 return update_system_input_method_count_; | |
| 32 } | |
| 33 | |
| 34 int update_user_input_method_count() const { | |
| 35 return update_user_input_method_count_; | |
| 36 } | |
| 37 | |
| 38 void set_hardware_keyboard_layout(const std::string& value) { | |
| 39 hardware_keyboard_layout_ = value; | |
| 40 } | |
| 41 | |
| 42 void set_active_locale(const std::string& value) { | |
| 43 active_locale_ = value; | |
| 44 } | |
| 45 | |
| 46 const std::string& system_input_method() const { | |
| 47 return system_input_method_; | |
| 48 } | |
| 49 | |
| 50 const std::string& user_input_method() const { | |
| 51 return user_input_method_; | |
| 52 } | |
| 53 | |
| 54 private: | |
| 55 std::string hardware_keyboard_layout_; | |
| 56 std::string active_locale_; | |
| 57 std::string system_input_method_; | |
| 58 std::string user_input_method_; | |
| 59 | |
| 60 int update_system_input_method_count_; | |
| 61 int update_user_input_method_count_; | |
| 62 | |
| 63 DISALLOW_COPY_AND_ASSIGN(MockInputMethodDelegate); | |
| 64 }; | |
| 65 | |
| 66 } // namespace input_method | |
| 67 } // namespace chromeos | |
| 68 | |
| 69 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_DELEGATE_H_ | |
| OLD | NEW |