Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: remoting/host/host_mock_objects.h

Issue 12594009: Converted LocalInputMonitor into a SessionController instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/desktop_session_agent.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 14 #include "remoting/host/disconnect_window.h"
15 #include "remoting/host/host_status_observer.h" 15 #include "remoting/host/host_status_observer.h"
16 #include "remoting/host/input_injector.h" 16 #include "remoting/host/input_injector.h"
17 #include "remoting/host/local_input_monitor.h"
18 #include "remoting/host/screen_controls.h" 17 #include "remoting/host/screen_controls.h"
19 #include "remoting/host/screen_resolution.h" 18 #include "remoting/host/screen_resolution.h"
20 #include "remoting/proto/control.pb.h" 19 #include "remoting/proto/control.pb.h"
21 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
22 21
23 namespace base { 22 namespace base {
24 class SingleThreadTaskRunner; 23 class SingleThreadTaskRunner;
25 } // namespace base 24 } // namespace base
26 25
27 namespace remoting { 26 namespace remoting {
(...skipping 18 matching lines...) Expand all
46 class MockDisconnectWindow : public DisconnectWindow { 45 class MockDisconnectWindow : public DisconnectWindow {
47 public: 46 public:
48 MockDisconnectWindow(); 47 MockDisconnectWindow();
49 virtual ~MockDisconnectWindow(); 48 virtual ~MockDisconnectWindow();
50 49
51 MOCK_METHOD2(Show, bool(const base::Closure& disconnect_callback, 50 MOCK_METHOD2(Show, bool(const base::Closure& disconnect_callback,
52 const std::string& username)); 51 const std::string& username));
53 MOCK_METHOD0(Hide, void()); 52 MOCK_METHOD0(Hide, void());
54 }; 53 };
55 54
56 class MockLocalInputMonitor : public LocalInputMonitor {
57 public:
58 MockLocalInputMonitor();
59 virtual ~MockLocalInputMonitor();
60
61 MOCK_METHOD2(Start, void(MouseMoveObserver* mouse_move_observer,
62 const base::Closure& disconnect_callback));
63 MOCK_METHOD0(Stop, void());
64 };
65
66 class MockContinueWindow : public ContinueWindow { 55 class MockContinueWindow : public ContinueWindow {
67 public: 56 public:
68 MockContinueWindow(); 57 MockContinueWindow();
69 virtual ~MockContinueWindow(); 58 virtual ~MockContinueWindow();
70 59
71 MOCK_METHOD1(Show, void( 60 MOCK_METHOD1(Show, void(
72 const remoting::ContinueWindow::ContinueSessionCallback& callback)); 61 const remoting::ContinueWindow::ContinueSessionCallback& callback));
73 MOCK_METHOD0(Hide, void()); 62 MOCK_METHOD0(Hide, void());
74 }; 63 };
75 64
65 class MockClientSessionControl : public ClientSessionControl {
66 public:
67 MockClientSessionControl();
68 virtual ~MockClientSessionControl();
69
70 MOCK_CONST_METHOD0(client_jid, const std::string&());
71 MOCK_METHOD0(DisconnectSession, void());
72 MOCK_METHOD1(OnLocalMouseMoved, void(const SkIPoint&));
73 MOCK_METHOD1(SetDisableInputs, void(bool));
74
75 private:
76 DISALLOW_COPY_AND_ASSIGN(MockClientSessionControl);
77 };
78
76 class MockClientSessionEventHandler : public ClientSession::EventHandler { 79 class MockClientSessionEventHandler : public ClientSession::EventHandler {
77 public: 80 public:
78 MockClientSessionEventHandler(); 81 MockClientSessionEventHandler();
79 virtual ~MockClientSessionEventHandler(); 82 virtual ~MockClientSessionEventHandler();
80 83
81 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); 84 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client));
82 MOCK_METHOD1(OnSessionChannelsConnected, void(ClientSession* client)); 85 MOCK_METHOD1(OnSessionChannelsConnected, void(ClientSession* client));
83 MOCK_METHOD1(OnSessionAuthenticationFailed, void(ClientSession* client)); 86 MOCK_METHOD1(OnSessionAuthenticationFailed, void(ClientSession* client));
84 MOCK_METHOD1(OnSessionClosed, void(ClientSession* client)); 87 MOCK_METHOD1(OnSessionClosed, void(ClientSession* client));
85 MOCK_METHOD2(OnSessionSequenceNumber, void(ClientSession* client, 88 MOCK_METHOD2(OnSessionSequenceNumber, void(ClientSession* client,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void(const std::string& jid, 142 void(const std::string& jid,
140 const std::string& channel_name, 143 const std::string& channel_name,
141 const protocol::TransportRoute& route)); 144 const protocol::TransportRoute& route));
142 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); 145 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login));
143 MOCK_METHOD0(OnShutdown, void()); 146 MOCK_METHOD0(OnShutdown, void());
144 }; 147 };
145 148
146 } // namespace remoting 149 } // namespace remoting
147 150
148 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ 151 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_agent.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698