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/continue_window.h" | 11 #include "remoting/host/continue_window.h" |
12 #include "remoting/host/desktop_environment.h" | 12 #include "remoting/host/desktop_environment.h" |
13 #include "remoting/host/disconnect_window.h" | 13 #include "remoting/host/disconnect_window.h" |
14 #include "remoting/host/event_executor.h" | 14 #include "remoting/host/event_executor.h" |
15 #include "remoting/host/host_status_observer.h" | 15 #include "remoting/host/host_status_observer.h" |
16 #include "remoting/host/local_input_monitor.h" | 16 #include "remoting/host/local_input_monitor.h" |
17 #include "remoting/host/ui_strings.h" | |
18 #include "remoting/proto/control.pb.h" | 17 #include "remoting/proto/control.pb.h" |
19 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
20 | 19 |
21 namespace base { | 20 namespace base { |
22 class SingleThreadTaskRunner; | 21 class SingleThreadTaskRunner; |
23 } // namespace base | 22 } // namespace base |
24 | 23 |
25 namespace remoting { | 24 namespace remoting { |
26 | 25 |
27 class MockDesktopEnvironment : public DesktopEnvironment { | 26 class MockDesktopEnvironment : public DesktopEnvironment { |
(...skipping 20 matching lines...) Expand all Loading... |
48 virtual scoped_ptr<VideoFrameCapturer> CreateVideoCapturer( | 47 virtual scoped_ptr<VideoFrameCapturer> CreateVideoCapturer( |
49 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, | 48 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, |
50 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE; | 49 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE; |
51 }; | 50 }; |
52 | 51 |
53 class MockDisconnectWindow : public DisconnectWindow { | 52 class MockDisconnectWindow : public DisconnectWindow { |
54 public: | 53 public: |
55 MockDisconnectWindow(); | 54 MockDisconnectWindow(); |
56 virtual ~MockDisconnectWindow(); | 55 virtual ~MockDisconnectWindow(); |
57 | 56 |
58 MOCK_METHOD3(Show, bool(const UiStrings& ui_strings, | 57 MOCK_METHOD2(Show, bool(const base::Closure& disconnect_callback, |
59 const base::Closure& disconnect_callback, | |
60 const std::string& username)); | 58 const std::string& username)); |
61 MOCK_METHOD0(Hide, void()); | 59 MOCK_METHOD0(Hide, void()); |
62 }; | 60 }; |
63 | 61 |
64 class MockLocalInputMonitor : public LocalInputMonitor { | 62 class MockLocalInputMonitor : public LocalInputMonitor { |
65 public: | 63 public: |
66 MockLocalInputMonitor(); | 64 MockLocalInputMonitor(); |
67 virtual ~MockLocalInputMonitor(); | 65 virtual ~MockLocalInputMonitor(); |
68 | 66 |
69 MOCK_METHOD2(Start, void(MouseMoveObserver* mouse_move_observer, | 67 MOCK_METHOD2(Start, void(MouseMoveObserver* mouse_move_observer, |
70 const base::Closure& disconnect_callback)); | 68 const base::Closure& disconnect_callback)); |
71 MOCK_METHOD0(Stop, void()); | 69 MOCK_METHOD0(Stop, void()); |
72 }; | 70 }; |
73 | 71 |
74 class MockContinueWindow : public ContinueWindow { | 72 class MockContinueWindow : public ContinueWindow { |
75 public: | 73 public: |
76 MockContinueWindow(); | 74 MockContinueWindow(); |
77 virtual ~MockContinueWindow(); | 75 virtual ~MockContinueWindow(); |
78 | 76 |
79 MOCK_METHOD2(Show, void( | 77 MOCK_METHOD1(Show, void( |
80 remoting::ChromotingHost* host, | |
81 const remoting::ContinueWindow::ContinueSessionCallback& callback)); | 78 const remoting::ContinueWindow::ContinueSessionCallback& callback)); |
82 MOCK_METHOD0(Hide, void()); | 79 MOCK_METHOD0(Hide, void()); |
83 }; | 80 }; |
84 | 81 |
85 class MockClientSessionEventHandler : public ClientSession::EventHandler { | 82 class MockClientSessionEventHandler : public ClientSession::EventHandler { |
86 public: | 83 public: |
87 MockClientSessionEventHandler(); | 84 MockClientSessionEventHandler(); |
88 virtual ~MockClientSessionEventHandler(); | 85 virtual ~MockClientSessionEventHandler(); |
89 | 86 |
90 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); | 87 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 void(const std::string& jid, | 148 void(const std::string& jid, |
152 const std::string& channel_name, | 149 const std::string& channel_name, |
153 const protocol::TransportRoute& route)); | 150 const protocol::TransportRoute& route)); |
154 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); | 151 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); |
155 MOCK_METHOD0(OnShutdown, void()); | 152 MOCK_METHOD0(OnShutdown, void()); |
156 }; | 153 }; |
157 | 154 |
158 } // namespace remoting | 155 } // namespace remoting |
159 | 156 |
160 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ | 157 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
OLD | NEW |