| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "net/base/ip_endpoint.h" | 11 #include "net/base/ip_endpoint.h" |
| 12 #include "remoting/codec/video_encoder.h" | 12 #include "remoting/codec/video_encoder.h" |
| 13 #include "remoting/host/chromoting_host_context.h" | 13 #include "remoting/host/chromoting_host_context.h" |
| 14 #include "remoting/host/client_session.h" | 14 #include "remoting/host/client_session.h" |
| 15 #include "remoting/host/client_session_control.h" | 15 #include "remoting/host/client_session_control.h" |
| 16 #include "remoting/host/desktop_environment.h" | 16 #include "remoting/host/desktop_environment.h" |
| 17 #include "remoting/host/host_status_observer.h" | 17 #include "remoting/host/host_status_observer.h" |
| 18 #include "remoting/host/input_injector.h" | 18 #include "remoting/host/input_injector.h" |
| 19 #include "remoting/host/screen_controls.h" | 19 #include "remoting/host/screen_controls.h" |
| 20 #include "remoting/host/screen_resolution.h" | 20 #include "remoting/host/screen_resolution.h" |
| 21 #include "remoting/host/security_key/gnubby_auth_handler.h" | 21 #include "remoting/host/security_key/gnubby_auth_handler.h" |
| 22 #include "remoting/proto/control.pb.h" | 22 #include "remoting/proto/control.pb.h" |
| 23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
| 24 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 24 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
| 25 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" | 25 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" |
| 26 | 26 |
| 27 namespace base { | 27 namespace base { |
| 28 class TimeDelta; |
| 28 class SingleThreadTaskRunner; | 29 class SingleThreadTaskRunner; |
| 29 } // namespace base | 30 } // namespace base |
| 30 | 31 |
| 31 namespace remoting { | 32 namespace remoting { |
| 32 | 33 |
| 33 class MockDesktopEnvironment : public DesktopEnvironment { | 34 class MockDesktopEnvironment : public DesktopEnvironment { |
| 34 public: | 35 public: |
| 35 MockDesktopEnvironment(); | 36 MockDesktopEnvironment(); |
| 36 ~MockDesktopEnvironment() override; | 37 ~MockDesktopEnvironment() override; |
| 37 | 38 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 class MockGnubbyAuthHandler : public GnubbyAuthHandler { | 142 class MockGnubbyAuthHandler : public GnubbyAuthHandler { |
| 142 public: | 143 public: |
| 143 MockGnubbyAuthHandler(); | 144 MockGnubbyAuthHandler(); |
| 144 ~MockGnubbyAuthHandler() override; | 145 ~MockGnubbyAuthHandler() override; |
| 145 | 146 |
| 146 MOCK_METHOD0(CreateGnubbyConnection, void()); | 147 MOCK_METHOD0(CreateGnubbyConnection, void()); |
| 147 MOCK_CONST_METHOD1(IsValidConnectionId, bool(int connection_id)); | 148 MOCK_CONST_METHOD1(IsValidConnectionId, bool(int connection_id)); |
| 148 MOCK_METHOD2(SendClientResponse, | 149 MOCK_METHOD2(SendClientResponse, |
| 149 void(int connection_id, const std::string& response)); | 150 void(int connection_id, const std::string& response)); |
| 150 MOCK_METHOD1(SendErrorAndCloseConnection, void(int connection_id)); | 151 MOCK_METHOD1(SendErrorAndCloseConnection, void(int connection_id)); |
| 152 MOCK_CONST_METHOD0(GetActiveConnectionCountForTest, size_t()); |
| 153 MOCK_METHOD1(SetRequestTimeoutForTest, void(const base::TimeDelta& timeout)); |
| 151 | 154 |
| 152 void SetSendMessageCallback( | 155 void SetSendMessageCallback( |
| 153 const GnubbyAuthHandler::SendMessageCallback& callback) override; | 156 const GnubbyAuthHandler::SendMessageCallback& callback) override; |
| 154 const GnubbyAuthHandler::SendMessageCallback& GetSendMessageCallback(); | 157 const GnubbyAuthHandler::SendMessageCallback& GetSendMessageCallback(); |
| 155 | 158 |
| 156 private: | 159 private: |
| 157 GnubbyAuthHandler::SendMessageCallback callback_; | 160 GnubbyAuthHandler::SendMessageCallback callback_; |
| 158 | 161 |
| 159 DISALLOW_COPY_AND_ASSIGN(MockGnubbyAuthHandler); | 162 DISALLOW_COPY_AND_ASSIGN(MockGnubbyAuthHandler); |
| 160 }; | 163 }; |
| 161 | 164 |
| 162 class MockMouseCursorMonitor : public webrtc::MouseCursorMonitor { | 165 class MockMouseCursorMonitor : public webrtc::MouseCursorMonitor { |
| 163 public: | 166 public: |
| 164 MockMouseCursorMonitor(); | 167 MockMouseCursorMonitor(); |
| 165 ~MockMouseCursorMonitor() override; | 168 ~MockMouseCursorMonitor() override; |
| 166 | 169 |
| 167 MOCK_METHOD2(Init, void(Callback* callback, Mode mode)); | 170 MOCK_METHOD2(Init, void(Callback* callback, Mode mode)); |
| 168 MOCK_METHOD0(Capture, void()); | 171 MOCK_METHOD0(Capture, void()); |
| 169 | 172 |
| 170 private: | 173 private: |
| 171 DISALLOW_COPY_AND_ASSIGN(MockMouseCursorMonitor); | 174 DISALLOW_COPY_AND_ASSIGN(MockMouseCursorMonitor); |
| 172 }; | 175 }; |
| 173 | 176 |
| 174 } // namespace remoting | 177 } // namespace remoting |
| 175 | 178 |
| 176 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ | 179 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
| OLD | NEW |