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/desktop_environment_factory.h" | 13 #include "remoting/host/desktop_environment_factory.h" |
14 #include "remoting/host/disconnect_window.h" | 14 #include "remoting/host/disconnect_window.h" |
15 #include "remoting/host/event_executor.h" | 15 #include "remoting/host/event_executor.h" |
16 #include "remoting/host/host_status_observer.h" | 16 #include "remoting/host/host_status_observer.h" |
17 #include "remoting/host/local_input_monitor.h" | 17 #include "remoting/host/local_input_monitor.h" |
18 #include "remoting/host/ui_strings.h" | |
19 #include "remoting/proto/control.pb.h" | 18 #include "remoting/proto/control.pb.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
21 | 20 |
22 namespace remoting { | 21 namespace remoting { |
23 | 22 |
24 class MockDisconnectWindow : public DisconnectWindow { | 23 class MockDisconnectWindow : public DisconnectWindow { |
25 public: | 24 public: |
26 MockDisconnectWindow(); | 25 MockDisconnectWindow(); |
27 virtual ~MockDisconnectWindow(); | 26 virtual ~MockDisconnectWindow(); |
28 | 27 |
29 MOCK_METHOD3(Show, bool(const UiStrings& ui_strings, | 28 MOCK_METHOD2(Show, bool(const base::Closure& disconnect_callback, |
30 const base::Closure& disconnect_callback, | |
31 const std::string& username)); | 29 const std::string& username)); |
32 MOCK_METHOD0(Hide, void()); | 30 MOCK_METHOD0(Hide, void()); |
33 }; | 31 }; |
34 | 32 |
35 class MockLocalInputMonitor : public LocalInputMonitor { | 33 class MockLocalInputMonitor : public LocalInputMonitor { |
36 public: | 34 public: |
37 MockLocalInputMonitor(); | 35 MockLocalInputMonitor(); |
38 virtual ~MockLocalInputMonitor(); | 36 virtual ~MockLocalInputMonitor(); |
39 | 37 |
40 MOCK_METHOD2(Start, void(MouseMoveObserver* mouse_move_observer, | 38 MOCK_METHOD2(Start, void(MouseMoveObserver* mouse_move_observer, |
41 const base::Closure& disconnect_callback)); | 39 const base::Closure& disconnect_callback)); |
42 MOCK_METHOD0(Stop, void()); | 40 MOCK_METHOD0(Stop, void()); |
43 }; | 41 }; |
44 | 42 |
45 class MockContinueWindow : public ContinueWindow { | 43 class MockContinueWindow : public ContinueWindow { |
46 public: | 44 public: |
47 MockContinueWindow(); | 45 MockContinueWindow(); |
48 virtual ~MockContinueWindow(); | 46 virtual ~MockContinueWindow(); |
49 | 47 |
50 MOCK_METHOD2(Show, void( | 48 MOCK_METHOD1(Show, void( |
51 remoting::ChromotingHost* host, | |
52 const remoting::ContinueWindow::ContinueSessionCallback& callback)); | 49 const remoting::ContinueWindow::ContinueSessionCallback& callback)); |
53 MOCK_METHOD0(Hide, void()); | 50 MOCK_METHOD0(Hide, void()); |
54 }; | 51 }; |
55 | 52 |
56 class MockClientSessionEventHandler : public ClientSession::EventHandler { | 53 class MockClientSessionEventHandler : public ClientSession::EventHandler { |
57 public: | 54 public: |
58 MockClientSessionEventHandler(); | 55 MockClientSessionEventHandler(); |
59 virtual ~MockClientSessionEventHandler(); | 56 virtual ~MockClientSessionEventHandler(); |
60 | 57 |
61 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); | 58 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 void(const std::string& jid, | 116 void(const std::string& jid, |
120 const std::string& channel_name, | 117 const std::string& channel_name, |
121 const protocol::TransportRoute& route)); | 118 const protocol::TransportRoute& route)); |
122 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); | 119 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); |
123 MOCK_METHOD0(OnShutdown, void()); | 120 MOCK_METHOD0(OnShutdown, void()); |
124 }; | 121 }; |
125 | 122 |
126 } // namespace remoting | 123 } // namespace remoting |
127 | 124 |
128 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ | 125 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
OLD | NEW |