| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CROS_MOCK_INPUT_METHOD_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> |
| 9 #include <string> | 10 #include <string> |
| 10 | 11 |
| 11 #include "chrome/browser/chromeos/cros/input_method_library.h" | 12 #include "chrome/browser/chromeos/cros/input_method_library.h" |
| 13 #include "googleurl/src/gurl.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 13 | 15 |
| 14 namespace chromeos { | 16 namespace chromeos { |
| 15 | 17 |
| 16 class MockInputMethodLibrary : public InputMethodLibrary { | 18 class MockInputMethodLibrary : public InputMethodLibrary { |
| 17 public: | 19 public: |
| 18 MockInputMethodLibrary(); | 20 MockInputMethodLibrary(); |
| 19 virtual ~MockInputMethodLibrary(); | 21 virtual ~MockInputMethodLibrary(); |
| 20 | 22 |
| 21 MOCK_METHOD1(AddObserver, void(Observer*)); | 23 MOCK_METHOD1(AddObserver, void(Observer*)); |
| 24 MOCK_METHOD1(AddVirtualKeyboardObserver, void(VirtualKeyboardObserver*)); |
| 22 MOCK_METHOD1(RemoveObserver, void(Observer*)); | 25 MOCK_METHOD1(RemoveObserver, void(Observer*)); |
| 26 MOCK_METHOD1(RemoveVirtualKeyboardObserver, void(VirtualKeyboardObserver*)); |
| 23 | 27 |
| 24 MOCK_METHOD0(GetActiveInputMethods, InputMethodDescriptors*(void)); | 28 MOCK_METHOD0(GetActiveInputMethods, InputMethodDescriptors*(void)); |
| 25 MOCK_METHOD0(GetNumActiveInputMethods, size_t(void)); | 29 MOCK_METHOD0(GetNumActiveInputMethods, size_t(void)); |
| 26 MOCK_METHOD0(GetSupportedInputMethods, InputMethodDescriptors*(void)); | 30 MOCK_METHOD0(GetSupportedInputMethods, InputMethodDescriptors*(void)); |
| 27 MOCK_METHOD1(ChangeInputMethod, void(const std::string&)); | 31 MOCK_METHOD1(ChangeInputMethod, void(const std::string&)); |
| 28 MOCK_METHOD2(SetImePropertyActivated, void(const std::string&, bool)); | 32 MOCK_METHOD2(SetImePropertyActivated, void(const std::string&, bool)); |
| 29 MOCK_METHOD1(InputMethodIsActivated, bool(const std::string&)); | 33 MOCK_METHOD1(InputMethodIsActivated, bool(const std::string&)); |
| 30 MOCK_METHOD3(SetImeConfig, bool(const std::string&, const std::string&, | 34 MOCK_METHOD3(SetImeConfig, bool(const std::string&, const std::string&, |
| 31 const ImeConfigValue&)); | 35 const ImeConfigValue&)); |
| 32 MOCK_CONST_METHOD0(previous_input_method, InputMethodDescriptor(void)); | 36 MOCK_CONST_METHOD0(previous_input_method, InputMethodDescriptor(void)); |
| 33 MOCK_CONST_METHOD0(current_input_method, InputMethodDescriptor(void)); | 37 MOCK_CONST_METHOD0(current_input_method, InputMethodDescriptor(void)); |
| 34 MOCK_CONST_METHOD0(current_ime_properties, const ImePropertyList&(void)); | 38 MOCK_CONST_METHOD0(current_ime_properties, const ImePropertyList&(void)); |
| 35 MOCK_METHOD1(GetKeyboardOverlayId, std::string(const std::string&)); | 39 MOCK_METHOD1(GetKeyboardOverlayId, std::string(const std::string&)); |
| 36 MOCK_METHOD0(StartInputMethodDaemon, bool(void)); | 40 MOCK_METHOD0(StartInputMethodDaemon, bool(void)); |
| 37 MOCK_METHOD0(StopInputMethodDaemon, void(void)); | 41 MOCK_METHOD0(StopInputMethodDaemon, void(void)); |
| 38 MOCK_METHOD1(SetDeferImeStartup, void(bool)); | 42 MOCK_METHOD1(SetDeferImeStartup, void(bool)); |
| 39 MOCK_METHOD1(SetEnableAutoImeShutdown, void(bool)); | 43 MOCK_METHOD1(SetEnableAutoImeShutdown, void(bool)); |
| 40 MOCK_METHOD1(SendHandwritingStroke, void(const HandwritingStroke&)); | 44 MOCK_METHOD1(SendHandwritingStroke, void(const HandwritingStroke&)); |
| 41 MOCK_METHOD1(CancelHandwritingStrokes, void(int)); | 45 MOCK_METHOD1(CancelHandwritingStrokes, void(int)); |
| 46 MOCK_METHOD3(RegisterVirtualKeyboard, void(const GURL&, |
| 47 const std::set<std::string>&, |
| 48 bool)); |
| 42 }; | 49 }; |
| 43 | 50 |
| 44 } // namespace chromeos | 51 } // namespace chromeos |
| 45 | 52 |
| 46 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_ | 53 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_ |
| OLD | NEW |