| 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 REMOTING_HOST_HOST_MOCK_OBJECTS_H_ | 5 #ifndef REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
| 6 #define REMOTING_HOST_HOST_MOCK_OBJECTS_H_ | 6 #define REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
| 7 | 7 |
| 8 #include "net/base/ip_endpoint.h" | 8 #include "net/base/ip_endpoint.h" |
| 9 #include "remoting/host/chromoting_host_context.h" | 9 #include "remoting/host/chromoting_host_context.h" |
| 10 #include "remoting/host/client_session.h" | 10 #include "remoting/host/client_session.h" |
| 11 #include "remoting/host/client_session_control.h" | 11 #include "remoting/host/client_session_control.h" |
| 12 #include "remoting/host/continue_window.h" | |
| 13 #include "remoting/host/desktop_environment.h" | 12 #include "remoting/host/desktop_environment.h" |
| 14 #include "remoting/host/host_status_observer.h" | 13 #include "remoting/host/host_status_observer.h" |
| 15 #include "remoting/host/host_window.h" | |
| 16 #include "remoting/host/input_injector.h" | 14 #include "remoting/host/input_injector.h" |
| 17 #include "remoting/host/screen_controls.h" | 15 #include "remoting/host/screen_controls.h" |
| 18 #include "remoting/host/screen_resolution.h" | 16 #include "remoting/host/screen_resolution.h" |
| 19 #include "remoting/proto/control.pb.h" | 17 #include "remoting/proto/control.pb.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 21 | 19 |
| 22 namespace base { | 20 namespace base { |
| 23 class SingleThreadTaskRunner; | 21 class SingleThreadTaskRunner; |
| 24 } // namespace base | 22 } // namespace base |
| 25 | 23 |
| 26 namespace remoting { | 24 namespace remoting { |
| 27 | 25 |
| 28 class MockDesktopEnvironment : public DesktopEnvironment { | 26 class MockDesktopEnvironment : public DesktopEnvironment { |
| 29 public: | 27 public: |
| 30 MockDesktopEnvironment(); | 28 MockDesktopEnvironment(); |
| 31 virtual ~MockDesktopEnvironment(); | 29 virtual ~MockDesktopEnvironment(); |
| 32 | 30 |
| 33 MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*()); | 31 MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*()); |
| 34 MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*()); | 32 MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*()); |
| 35 MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*()); | 33 MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*()); |
| 36 MOCK_METHOD0(CreateVideoCapturerPtr, media::ScreenCapturer*()); | 34 MOCK_METHOD0(CreateVideoCapturerPtr, media::ScreenCapturer*()); |
| 37 | 35 |
| 38 // DesktopEnvironment implementation. | 36 // DesktopEnvironment implementation. |
| 39 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE; | 37 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE; |
| 40 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; | 38 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; |
| 41 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; | 39 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; |
| 42 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() OVERRIDE; | 40 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() OVERRIDE; |
| 43 }; | 41 }; |
| 44 | 42 |
| 45 class MockContinueWindow : public ContinueWindow { | |
| 46 public: | |
| 47 MockContinueWindow(); | |
| 48 virtual ~MockContinueWindow(); | |
| 49 | |
| 50 MOCK_METHOD1(Show, void( | |
| 51 const remoting::ContinueWindow::ContinueSessionCallback& callback)); | |
| 52 MOCK_METHOD0(Hide, void()); | |
| 53 }; | |
| 54 | |
| 55 class MockClientSessionControl : public ClientSessionControl { | 43 class MockClientSessionControl : public ClientSessionControl { |
| 56 public: | 44 public: |
| 57 MockClientSessionControl(); | 45 MockClientSessionControl(); |
| 58 virtual ~MockClientSessionControl(); | 46 virtual ~MockClientSessionControl(); |
| 59 | 47 |
| 60 MOCK_CONST_METHOD0(client_jid, const std::string&()); | 48 MOCK_CONST_METHOD0(client_jid, const std::string&()); |
| 61 MOCK_METHOD0(DisconnectSession, void()); | 49 MOCK_METHOD0(DisconnectSession, void()); |
| 62 MOCK_METHOD1(OnLocalMouseMoved, void(const SkIPoint&)); | 50 MOCK_METHOD1(OnLocalMouseMoved, void(const SkIPoint&)); |
| 63 MOCK_METHOD1(SetDisableInputs, void(bool)); | 51 MOCK_METHOD1(SetDisableInputs, void(bool)); |
| 64 | 52 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 void(const std::string& jid, | 120 void(const std::string& jid, |
| 133 const std::string& channel_name, | 121 const std::string& channel_name, |
| 134 const protocol::TransportRoute& route)); | 122 const protocol::TransportRoute& route)); |
| 135 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); | 123 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); |
| 136 MOCK_METHOD0(OnShutdown, void()); | 124 MOCK_METHOD0(OnShutdown, void()); |
| 137 }; | 125 }; |
| 138 | 126 |
| 139 } // namespace remoting | 127 } // namespace remoting |
| 140 | 128 |
| 141 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ | 129 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
| OLD | NEW |