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" | 12 #include "remoting/host/continue_window.h" |
13 #include "remoting/host/desktop_environment.h" | 13 #include "remoting/host/desktop_environment.h" |
14 #include "remoting/host/disconnect_window.h" | |
15 #include "remoting/host/host_status_observer.h" | 14 #include "remoting/host/host_status_observer.h" |
| 15 #include "remoting/host/host_window.h" |
16 #include "remoting/host/input_injector.h" | 16 #include "remoting/host/input_injector.h" |
17 #include "remoting/host/screen_controls.h" | 17 #include "remoting/host/screen_controls.h" |
18 #include "remoting/host/screen_resolution.h" | 18 #include "remoting/host/screen_resolution.h" |
19 #include "remoting/proto/control.pb.h" | 19 #include "remoting/proto/control.pb.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
21 | 21 |
22 namespace base { | 22 namespace base { |
23 class SingleThreadTaskRunner; | 23 class SingleThreadTaskRunner; |
24 } // namespace base | 24 } // namespace base |
25 | 25 |
26 namespace remoting { | 26 namespace remoting { |
27 | 27 |
28 class MockDesktopEnvironment : public DesktopEnvironment { | 28 class MockDesktopEnvironment : public DesktopEnvironment { |
29 public: | 29 public: |
30 MockDesktopEnvironment(); | 30 MockDesktopEnvironment(); |
31 virtual ~MockDesktopEnvironment(); | 31 virtual ~MockDesktopEnvironment(); |
32 | 32 |
33 MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*()); | 33 MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*()); |
34 MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*()); | 34 MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*()); |
35 MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*()); | 35 MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*()); |
36 MOCK_METHOD0(CreateVideoCapturerPtr, media::ScreenCapturer*()); | 36 MOCK_METHOD0(CreateVideoCapturerPtr, media::ScreenCapturer*()); |
37 | 37 |
38 // DesktopEnvironment implementation. | 38 // DesktopEnvironment implementation. |
39 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE; | 39 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE; |
40 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; | 40 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; |
41 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; | 41 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; |
42 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() OVERRIDE; | 42 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() OVERRIDE; |
43 }; | 43 }; |
44 | 44 |
45 class MockDisconnectWindow : public DisconnectWindow { | |
46 public: | |
47 MockDisconnectWindow(); | |
48 virtual ~MockDisconnectWindow(); | |
49 | |
50 MOCK_METHOD2(Show, bool(const base::Closure& disconnect_callback, | |
51 const std::string& username)); | |
52 MOCK_METHOD0(Hide, void()); | |
53 }; | |
54 | |
55 class MockContinueWindow : public ContinueWindow { | 45 class MockContinueWindow : public ContinueWindow { |
56 public: | 46 public: |
57 MockContinueWindow(); | 47 MockContinueWindow(); |
58 virtual ~MockContinueWindow(); | 48 virtual ~MockContinueWindow(); |
59 | 49 |
60 MOCK_METHOD1(Show, void( | 50 MOCK_METHOD1(Show, void( |
61 const remoting::ContinueWindow::ContinueSessionCallback& callback)); | 51 const remoting::ContinueWindow::ContinueSessionCallback& callback)); |
62 MOCK_METHOD0(Hide, void()); | 52 MOCK_METHOD0(Hide, void()); |
63 }; | 53 }; |
64 | 54 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 void(const std::string& jid, | 132 void(const std::string& jid, |
143 const std::string& channel_name, | 133 const std::string& channel_name, |
144 const protocol::TransportRoute& route)); | 134 const protocol::TransportRoute& route)); |
145 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); | 135 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); |
146 MOCK_METHOD0(OnShutdown, void()); | 136 MOCK_METHOD0(OnShutdown, void()); |
147 }; | 137 }; |
148 | 138 |
149 } // namespace remoting | 139 } // namespace remoting |
150 | 140 |
151 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ | 141 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
OLD | NEW |