| 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_IBUS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_IBUS_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_IBUS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_IBUS_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/chromeos/input_method/ibus_controller_base.h" | 9 #include "chrome/browser/chromeos/input_method/ibus_controller_base.h" |
| 10 | 10 |
| 11 namespace chromeos { | 11 namespace chromeos { |
| 12 namespace input_method { | 12 namespace input_method { |
| 13 | 13 |
| 14 struct InputMethodConfigValue; | 14 struct InputMethodConfigValue; |
| 15 struct InputMethodProperty; | 15 struct InputMethodProperty; |
| 16 | 16 |
| 17 // Mock IBusController implementation. | 17 // Mock IBusController implementation. |
| 18 class MockIBusController : public IBusControllerBase { | 18 class MockIBusController : public IBusControllerBase { |
| 19 public: | 19 public: |
| 20 MockIBusController(); | 20 MockIBusController(); |
| 21 virtual ~MockIBusController(); | 21 virtual ~MockIBusController(); |
| 22 | 22 |
| 23 // IBusController overrides: | 23 // IBusController overrides: |
| 24 virtual bool Start() OVERRIDE; | 24 virtual bool Start() OVERRIDE; |
| 25 virtual void Reset() OVERRIDE; |
| 25 virtual bool Stop() OVERRIDE; | 26 virtual bool Stop() OVERRIDE; |
| 26 virtual bool ChangeInputMethod(const std::string& id) OVERRIDE; | 27 virtual bool ChangeInputMethod(const std::string& id) OVERRIDE; |
| 27 virtual bool ActivateInputMethodProperty(const std::string& key) OVERRIDE; | 28 virtual bool ActivateInputMethodProperty(const std::string& key) OVERRIDE; |
| 28 #if defined(USE_VIRTUAL_KEYBOARD) | 29 #if defined(USE_VIRTUAL_KEYBOARD) |
| 29 virtual void SendHandwritingStroke(const HandwritingStroke& stroke) OVERRIDE { | 30 virtual void SendHandwritingStroke(const HandwritingStroke& stroke) OVERRIDE { |
| 30 } | 31 } |
| 31 virtual void CancelHandwriting(int n_strokes) OVERRIDE { | 32 virtual void CancelHandwriting(int n_strokes) OVERRIDE { |
| 32 } | 33 } |
| 33 #endif | 34 #endif |
| 34 | 35 |
| 35 int start_count_; | 36 int start_count_; |
| 36 bool start_return_; | 37 bool start_return_; |
| 38 int reset_count_; |
| 37 int stop_count_; | 39 int stop_count_; |
| 38 bool stop_return_; | 40 bool stop_return_; |
| 39 int change_input_method_count_; | 41 int change_input_method_count_; |
| 40 std::string change_input_method_id_; | 42 std::string change_input_method_id_; |
| 41 bool change_input_method_return_; | 43 bool change_input_method_return_; |
| 42 int activate_input_method_property_count_; | 44 int activate_input_method_property_count_; |
| 43 std::string activate_input_method_property_key_; | 45 std::string activate_input_method_property_key_; |
| 44 bool activate_input_method_property_return_; | 46 bool activate_input_method_property_return_; |
| 45 int set_input_method_config_internal_count_; | 47 int set_input_method_config_internal_count_; |
| 46 ConfigKeyType set_input_method_config_internal_key_; | 48 ConfigKeyType set_input_method_config_internal_key_; |
| 47 InputMethodConfigValue set_input_method_config_internal_value_; | 49 InputMethodConfigValue set_input_method_config_internal_value_; |
| 48 bool set_input_method_config_internal_return_; | 50 bool set_input_method_config_internal_return_; |
| 49 | 51 |
| 50 protected: | 52 protected: |
| 51 // IBusControllerBase overrides: | 53 // IBusControllerBase overrides: |
| 52 virtual bool SetInputMethodConfigInternal( | 54 virtual bool SetInputMethodConfigInternal( |
| 53 const ConfigKeyType& key, | 55 const ConfigKeyType& key, |
| 54 const InputMethodConfigValue& value) OVERRIDE; | 56 const InputMethodConfigValue& value) OVERRIDE; |
| 55 | 57 |
| 56 private: | 58 private: |
| 57 DISALLOW_COPY_AND_ASSIGN(MockIBusController); | 59 DISALLOW_COPY_AND_ASSIGN(MockIBusController); |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 } // namespace input_method | 62 } // namespace input_method |
| 61 } // namespace chromeos | 63 } // namespace chromeos |
| 62 | 64 |
| 63 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_IBUS_CONTROLLER_H_ | 65 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_IBUS_CONTROLLER_H_ |
| OLD | NEW |