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

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

Issue 12760012: Rename EventExecutor to InputInjector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace some missed occurrences and remove unused include. 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/event_executor_win.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/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"
15 #include "remoting/host/host_status_observer.h" 14 #include "remoting/host/host_status_observer.h"
15 #include "remoting/host/input_injector.h"
16 #include "remoting/host/local_input_monitor.h" 16 #include "remoting/host/local_input_monitor.h"
17 #include "remoting/host/screen_resolution.h" 17 #include "remoting/host/screen_resolution.h"
18 #include "remoting/host/session_controller.h" 18 #include "remoting/host/session_controller.h"
19 #include "remoting/proto/control.pb.h" 19 #include "remoting/proto/control.pb.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 21
22 namespace base { 22 namespace base {
23 class SingleThreadTaskRunner; 23 class SingleThreadTaskRunner;
24 } // namespace base 24 } // namespace base
25 25
26 namespace remoting { 26 namespace remoting {
27 27
28 class MockDesktopEnvironment : public DesktopEnvironment { 28 class MockDesktopEnvironment : public DesktopEnvironment {
29 public: 29 public:
30 MockDesktopEnvironment(); 30 MockDesktopEnvironment();
31 virtual ~MockDesktopEnvironment(); 31 virtual ~MockDesktopEnvironment();
32 32
33 MOCK_METHOD1(CreateAudioCapturerPtr, 33 MOCK_METHOD1(CreateAudioCapturerPtr,
34 AudioCapturer*(scoped_refptr<base::SingleThreadTaskRunner>)); 34 AudioCapturer*(scoped_refptr<base::SingleThreadTaskRunner>));
35 MOCK_METHOD2(CreateEventExecutorPtr, 35 MOCK_METHOD2(CreateInputInjectorPtr,
36 EventExecutor*(scoped_refptr<base::SingleThreadTaskRunner>, 36 InputInjector*(scoped_refptr<base::SingleThreadTaskRunner>,
37 scoped_refptr<base::SingleThreadTaskRunner>)); 37 scoped_refptr<base::SingleThreadTaskRunner>));
38 MOCK_METHOD0(CreateSessionControllerPtr, SessionController*()); 38 MOCK_METHOD0(CreateSessionControllerPtr, SessionController*());
39 MOCK_METHOD2( 39 MOCK_METHOD2(
40 CreateVideoCapturerPtr, 40 CreateVideoCapturerPtr,
41 media::ScreenCapturer*(scoped_refptr<base::SingleThreadTaskRunner>, 41 media::ScreenCapturer*(scoped_refptr<base::SingleThreadTaskRunner>,
42 scoped_refptr<base::SingleThreadTaskRunner>)); 42 scoped_refptr<base::SingleThreadTaskRunner>));
43 43
44 // DesktopEnvironment implementation. 44 // DesktopEnvironment implementation.
45 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer( 45 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer(
46 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) OVERRIDE; 46 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) OVERRIDE;
47 virtual scoped_ptr<EventExecutor> CreateEventExecutor( 47 virtual scoped_ptr<InputInjector> CreateInputInjector(
48 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 48 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
49 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) OVERRIDE; 49 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) OVERRIDE;
50 virtual scoped_ptr<SessionController> CreateSessionController() OVERRIDE; 50 virtual scoped_ptr<SessionController> CreateSessionController() OVERRIDE;
51 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer( 51 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer(
52 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, 52 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
53 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE; 53 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE;
54 }; 54 };
55 55
56 class MockDisconnectWindow : public DisconnectWindow { 56 class MockDisconnectWindow : public DisconnectWindow {
57 public: 57 public:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 MOCK_CONST_METHOD0(SupportsAudioCapture, bool()); 112 MOCK_CONST_METHOD0(SupportsAudioCapture, bool());
113 113
114 virtual scoped_ptr<DesktopEnvironment> Create( 114 virtual scoped_ptr<DesktopEnvironment> Create(
115 const std::string& client_jid, 115 const std::string& client_jid,
116 const base::Closure& disconnect_callback) OVERRIDE; 116 const base::Closure& disconnect_callback) OVERRIDE;
117 117
118 private: 118 private:
119 DISALLOW_COPY_AND_ASSIGN(MockDesktopEnvironmentFactory); 119 DISALLOW_COPY_AND_ASSIGN(MockDesktopEnvironmentFactory);
120 }; 120 };
121 121
122 class MockEventExecutor : public EventExecutor { 122 class MockInputInjector : public InputInjector {
123 public: 123 public:
124 MockEventExecutor(); 124 MockInputInjector();
125 virtual ~MockEventExecutor(); 125 virtual ~MockInputInjector();
126 126
127 MOCK_METHOD1(InjectClipboardEvent, 127 MOCK_METHOD1(InjectClipboardEvent,
128 void(const protocol::ClipboardEvent& event)); 128 void(const protocol::ClipboardEvent& event));
129 MOCK_METHOD1(InjectKeyEvent, void(const protocol::KeyEvent& event)); 129 MOCK_METHOD1(InjectKeyEvent, void(const protocol::KeyEvent& event));
130 MOCK_METHOD1(InjectMouseEvent, void(const protocol::MouseEvent& event)); 130 MOCK_METHOD1(InjectMouseEvent, void(const protocol::MouseEvent& event));
131 MOCK_METHOD1(StartPtr, 131 MOCK_METHOD1(StartPtr,
132 void(protocol::ClipboardStub* client_clipboard)); 132 void(protocol::ClipboardStub* client_clipboard));
133 133
134 void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard); 134 void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard);
135 135
136 private: 136 private:
137 DISALLOW_COPY_AND_ASSIGN(MockEventExecutor); 137 DISALLOW_COPY_AND_ASSIGN(MockInputInjector);
138 }; 138 };
139 139
140 class MockHostStatusObserver : public HostStatusObserver { 140 class MockHostStatusObserver : public HostStatusObserver {
141 public: 141 public:
142 MockHostStatusObserver(); 142 MockHostStatusObserver();
143 virtual ~MockHostStatusObserver(); 143 virtual ~MockHostStatusObserver();
144 144
145 MOCK_METHOD1(OnAccessDenied, void(const std::string& jid)); 145 MOCK_METHOD1(OnAccessDenied, void(const std::string& jid));
146 MOCK_METHOD1(OnClientAuthenticated, void(const std::string& jid)); 146 MOCK_METHOD1(OnClientAuthenticated, void(const std::string& jid));
147 MOCK_METHOD1(OnClientConnected, void(const std::string& jid)); 147 MOCK_METHOD1(OnClientConnected, void(const std::string& jid));
(...skipping 13 matching lines...) Expand all
161 161
162 MOCK_METHOD1(SetScreenResolution, void(const ScreenResolution&)); 162 MOCK_METHOD1(SetScreenResolution, void(const ScreenResolution&));
163 163
164 private: 164 private:
165 DISALLOW_COPY_AND_ASSIGN(MockSessionController); 165 DISALLOW_COPY_AND_ASSIGN(MockSessionController);
166 }; 166 };
167 167
168 } // namespace remoting 168 } // namespace remoting
169 169
170 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ 170 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
OLDNEW
« no previous file with comments | « remoting/host/event_executor_win.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698