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 <cstdint> | 8 #include <cstdint> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "net/base/ip_endpoint.h" | 13 #include "net/base/ip_endpoint.h" |
14 #include "remoting/codec/video_encoder.h" | |
15 #include "remoting/host/chromoting_host_context.h" | 14 #include "remoting/host/chromoting_host_context.h" |
16 #include "remoting/host/client_session.h" | 15 #include "remoting/host/client_session.h" |
17 #include "remoting/host/client_session_control.h" | 16 #include "remoting/host/client_session_control.h" |
| 17 #include "remoting/host/client_session_details.h" |
18 #include "remoting/host/desktop_environment.h" | 18 #include "remoting/host/desktop_environment.h" |
19 #include "remoting/host/host_status_observer.h" | 19 #include "remoting/host/host_status_observer.h" |
20 #include "remoting/host/input_injector.h" | 20 #include "remoting/host/input_injector.h" |
21 #include "remoting/host/screen_controls.h" | 21 #include "remoting/host/screen_controls.h" |
22 #include "remoting/host/screen_resolution.h" | 22 #include "remoting/host/screen_resolution.h" |
23 #include "remoting/host/security_key/gnubby_auth_handler.h" | 23 #include "remoting/host/security_key/gnubby_auth_handler.h" |
24 #include "remoting/proto/control.pb.h" | 24 #include "remoting/proto/control.pb.h" |
25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
26 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 26 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
27 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" | 27 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 MOCK_CONST_METHOD0(client_jid, const std::string&()); | 64 MOCK_CONST_METHOD0(client_jid, const std::string&()); |
65 MOCK_METHOD1(DisconnectSession, void(protocol::ErrorCode error)); | 65 MOCK_METHOD1(DisconnectSession, void(protocol::ErrorCode error)); |
66 MOCK_METHOD1(OnLocalMouseMoved, void(const webrtc::DesktopVector&)); | 66 MOCK_METHOD1(OnLocalMouseMoved, void(const webrtc::DesktopVector&)); |
67 MOCK_METHOD1(SetDisableInputs, void(bool)); | 67 MOCK_METHOD1(SetDisableInputs, void(bool)); |
68 MOCK_METHOD0(ResetVideoPipeline, void()); | 68 MOCK_METHOD0(ResetVideoPipeline, void()); |
69 | 69 |
70 private: | 70 private: |
71 DISALLOW_COPY_AND_ASSIGN(MockClientSessionControl); | 71 DISALLOW_COPY_AND_ASSIGN(MockClientSessionControl); |
72 }; | 72 }; |
73 | 73 |
| 74 class MockClientSessionDetails : public ClientSessionDetails { |
| 75 public: |
| 76 MockClientSessionDetails(); |
| 77 ~MockClientSessionDetails() override; |
| 78 |
| 79 MOCK_METHOD0(session_control, ClientSessionControl*()); |
| 80 MOCK_CONST_METHOD0(desktop_session_id, uint32_t()); |
| 81 |
| 82 private: |
| 83 DISALLOW_COPY_AND_ASSIGN(MockClientSessionDetails); |
| 84 }; |
| 85 |
74 class MockClientSessionEventHandler : public ClientSession::EventHandler { | 86 class MockClientSessionEventHandler : public ClientSession::EventHandler { |
75 public: | 87 public: |
76 MockClientSessionEventHandler(); | 88 MockClientSessionEventHandler(); |
77 ~MockClientSessionEventHandler() override; | 89 ~MockClientSessionEventHandler() override; |
78 | 90 |
79 MOCK_METHOD1(OnSessionAuthenticating, void(ClientSession* client)); | 91 MOCK_METHOD1(OnSessionAuthenticating, void(ClientSession* client)); |
80 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); | 92 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); |
81 MOCK_METHOD1(OnSessionChannelsConnected, void(ClientSession* client)); | 93 MOCK_METHOD1(OnSessionChannelsConnected, void(ClientSession* client)); |
82 MOCK_METHOD1(OnSessionAuthenticationFailed, void(ClientSession* client)); | 94 MOCK_METHOD1(OnSessionAuthenticationFailed, void(ClientSession* client)); |
83 MOCK_METHOD1(OnSessionClosed, void(ClientSession* client)); | 95 MOCK_METHOD1(OnSessionClosed, void(ClientSession* client)); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 MOCK_METHOD2(Init, void(Callback* callback, Mode mode)); | 185 MOCK_METHOD2(Init, void(Callback* callback, Mode mode)); |
174 MOCK_METHOD0(Capture, void()); | 186 MOCK_METHOD0(Capture, void()); |
175 | 187 |
176 private: | 188 private: |
177 DISALLOW_COPY_AND_ASSIGN(MockMouseCursorMonitor); | 189 DISALLOW_COPY_AND_ASSIGN(MockMouseCursorMonitor); |
178 }; | 190 }; |
179 | 191 |
180 } // namespace remoting | 192 } // namespace remoting |
181 | 193 |
182 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ | 194 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
OLD | NEW |