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