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

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

Issue 92473002: Use webrtc::MouseCursorMonitor for cursor shapes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux build Created 6 years, 4 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/fake_mouse_cursor_monitor.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 <string> 8 #include <string>
9 9
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
11 #include "remoting/host/chromoting_host_context.h" 11 #include "remoting/host/chromoting_host_context.h"
12 #include "remoting/host/client_session.h" 12 #include "remoting/host/client_session.h"
13 #include "remoting/host/client_session_control.h" 13 #include "remoting/host/client_session_control.h"
14 #include "remoting/host/desktop_environment.h" 14 #include "remoting/host/desktop_environment.h"
15 #include "remoting/host/gnubby_auth_handler.h" 15 #include "remoting/host/gnubby_auth_handler.h"
16 #include "remoting/host/host_status_observer.h" 16 #include "remoting/host/host_status_observer.h"
17 #include "remoting/host/input_injector.h" 17 #include "remoting/host/input_injector.h"
18 #include "remoting/host/screen_controls.h" 18 #include "remoting/host/screen_controls.h"
19 #include "remoting/host/screen_resolution.h" 19 #include "remoting/host/screen_resolution.h"
20 #include "remoting/proto/control.pb.h" 20 #include "remoting/proto/control.pb.h"
21 #include "testing/gmock/include/gmock/gmock.h" 21 #include "testing/gmock/include/gmock/gmock.h"
22 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
22 23
23 namespace base { 24 namespace base {
24 class SingleThreadTaskRunner; 25 class SingleThreadTaskRunner;
25 } // namespace base 26 } // namespace base
26 27
27 namespace remoting { 28 namespace remoting {
28 29
29 class MockDesktopEnvironment : public DesktopEnvironment { 30 class MockDesktopEnvironment : public DesktopEnvironment {
30 public: 31 public:
31 MockDesktopEnvironment(); 32 MockDesktopEnvironment();
32 virtual ~MockDesktopEnvironment(); 33 virtual ~MockDesktopEnvironment();
33 34
34 MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*()); 35 MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*());
35 MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*()); 36 MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*());
36 MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*()); 37 MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*());
37 MOCK_METHOD0(CreateVideoCapturerPtr, webrtc::ScreenCapturer*()); 38 MOCK_METHOD0(CreateVideoCapturerPtr, webrtc::ScreenCapturer*());
39 MOCK_METHOD0(CreateMouseCursorMonitorPtr, webrtc::MouseCursorMonitor*());
38 MOCK_CONST_METHOD0(GetCapabilities, std::string()); 40 MOCK_CONST_METHOD0(GetCapabilities, std::string());
39 MOCK_METHOD1(SetCapabilities, void(const std::string&)); 41 MOCK_METHOD1(SetCapabilities, void(const std::string&));
40 MOCK_METHOD1(CreateGnubbyAuthHandlerPtr, GnubbyAuthHandler*( 42 MOCK_METHOD1(CreateGnubbyAuthHandlerPtr, GnubbyAuthHandler*(
41 protocol::ClientStub* client_stub)); 43 protocol::ClientStub* client_stub));
42 44
43 // DesktopEnvironment implementation. 45 // DesktopEnvironment implementation.
44 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE; 46 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE;
45 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; 47 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE;
46 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; 48 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE;
47 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE; 49 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE;
48 virtual scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler( 50 virtual scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
49 protocol::ClientStub* client_stub) OVERRIDE; 51 protocol::ClientStub* client_stub) OVERRIDE;
52 virtual scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor()
53 OVERRIDE;
50 }; 54 };
51 55
52 class MockClientSessionControl : public ClientSessionControl { 56 class MockClientSessionControl : public ClientSessionControl {
53 public: 57 public:
54 MockClientSessionControl(); 58 MockClientSessionControl();
55 virtual ~MockClientSessionControl(); 59 virtual ~MockClientSessionControl();
56 60
57 MOCK_CONST_METHOD0(client_jid, const std::string&()); 61 MOCK_CONST_METHOD0(client_jid, const std::string&());
58 MOCK_METHOD0(DisconnectSession, void()); 62 MOCK_METHOD0(DisconnectSession, void());
59 MOCK_METHOD1(OnLocalMouseMoved, void(const webrtc::DesktopVector&)); 63 MOCK_METHOD1(OnLocalMouseMoved, void(const webrtc::DesktopVector&));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 virtual ~MockGnubbyAuthHandler(); 144 virtual ~MockGnubbyAuthHandler();
141 145
142 MOCK_METHOD1(DeliverClientMessage, void(const std::string& message)); 146 MOCK_METHOD1(DeliverClientMessage, void(const std::string& message));
143 MOCK_CONST_METHOD2(DeliverHostDataMessage, 147 MOCK_CONST_METHOD2(DeliverHostDataMessage,
144 void(int connection_id, const std::string& data)); 148 void(int connection_id, const std::string& data));
145 149
146 private: 150 private:
147 DISALLOW_COPY_AND_ASSIGN(MockGnubbyAuthHandler); 151 DISALLOW_COPY_AND_ASSIGN(MockGnubbyAuthHandler);
148 }; 152 };
149 153
154 class MockMouseCursorMonitor : public webrtc::MouseCursorMonitor {
155 public:
156 MockMouseCursorMonitor();
157 virtual ~MockMouseCursorMonitor();
158
159 MOCK_METHOD2(Init, void(Callback* callback, Mode mode));
160 MOCK_METHOD0(Capture, void());
161
162 private:
163 DISALLOW_COPY_AND_ASSIGN(MockMouseCursorMonitor);
164 };
165
150 } // namespace remoting 166 } // namespace remoting
151 167
152 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ 168 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
OLDNEW
« no previous file with comments | « remoting/host/fake_mouse_cursor_monitor.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698