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

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: Removed obsolete #include. Created 6 years, 11 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
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/desktop_environment.h" 12 #include "remoting/host/desktop_environment.h"
13 #include "remoting/host/host_status_observer.h" 13 #include "remoting/host/host_status_observer.h"
14 #include "remoting/host/input_injector.h" 14 #include "remoting/host/input_injector.h"
15 #include "remoting/host/screen_controls.h" 15 #include "remoting/host/screen_controls.h"
16 #include "remoting/host/screen_resolution.h" 16 #include "remoting/host/screen_resolution.h"
17 #include "remoting/proto/control.pb.h" 17 #include "remoting/proto/control.pb.h"
18 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
19 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
19 20
20 namespace base { 21 namespace base {
21 class SingleThreadTaskRunner; 22 class SingleThreadTaskRunner;
22 } // namespace base 23 } // namespace base
23 24
24 namespace remoting { 25 namespace remoting {
25 26
26 class MockDesktopEnvironment : public DesktopEnvironment { 27 class MockDesktopEnvironment : public DesktopEnvironment {
27 public: 28 public:
28 MockDesktopEnvironment(); 29 MockDesktopEnvironment();
29 virtual ~MockDesktopEnvironment(); 30 virtual ~MockDesktopEnvironment();
30 31
31 MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*()); 32 MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*());
32 MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*()); 33 MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*());
33 MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*()); 34 MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*());
34 MOCK_METHOD0(CreateVideoCapturerPtr, webrtc::ScreenCapturer*()); 35 MOCK_METHOD0(CreateVideoCapturerPtr, webrtc::ScreenCapturer*());
36 MOCK_METHOD0(CreateMouseCursorMonitorPtr, webrtc::MouseCursorMonitor*());
35 MOCK_CONST_METHOD0(GetCapabilities, std::string()); 37 MOCK_CONST_METHOD0(GetCapabilities, std::string());
36 MOCK_METHOD1(SetCapabilities, void(const std::string&)); 38 MOCK_METHOD1(SetCapabilities, void(const std::string&));
37 39
38 // DesktopEnvironment implementation. 40 // DesktopEnvironment implementation.
39 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE; 41 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE;
40 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; 42 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE;
41 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; 43 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE;
42 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE; 44 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE;
45 virtual scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor()
46 OVERRIDE;
43 }; 47 };
44 48
45 class MockClientSessionControl : public ClientSessionControl { 49 class MockClientSessionControl : public ClientSessionControl {
46 public: 50 public:
47 MockClientSessionControl(); 51 MockClientSessionControl();
48 virtual ~MockClientSessionControl(); 52 virtual ~MockClientSessionControl();
49 53
50 MOCK_CONST_METHOD0(client_jid, const std::string&()); 54 MOCK_CONST_METHOD0(client_jid, const std::string&());
51 MOCK_METHOD0(DisconnectSession, void()); 55 MOCK_METHOD0(DisconnectSession, void());
52 MOCK_METHOD1(OnLocalMouseMoved, void(const webrtc::DesktopVector&)); 56 MOCK_METHOD1(OnLocalMouseMoved, void(const webrtc::DesktopVector&));
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 MOCK_METHOD1(OnClientConnected, void(const std::string& jid)); 123 MOCK_METHOD1(OnClientConnected, void(const std::string& jid));
120 MOCK_METHOD1(OnClientDisconnected, void(const std::string& jid)); 124 MOCK_METHOD1(OnClientDisconnected, void(const std::string& jid));
121 MOCK_METHOD3(OnClientRouteChange, 125 MOCK_METHOD3(OnClientRouteChange,
122 void(const std::string& jid, 126 void(const std::string& jid,
123 const std::string& channel_name, 127 const std::string& channel_name,
124 const protocol::TransportRoute& route)); 128 const protocol::TransportRoute& route));
125 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); 129 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login));
126 MOCK_METHOD0(OnShutdown, void()); 130 MOCK_METHOD0(OnShutdown, void());
127 }; 131 };
128 132
133 class MockMouseCursorMonitor : public webrtc::MouseCursorMonitor {
134 public:
135 MockMouseCursorMonitor();
136 virtual ~MockMouseCursorMonitor();
137
138 MOCK_METHOD2(Init, void(Callback* callback, Mode mode));
139 MOCK_METHOD0(Capture, void());
140
141 private:
142 DISALLOW_COPY_AND_ASSIGN(MockMouseCursorMonitor);
143 };
144
129 } // namespace remoting 145 } // namespace remoting
130 146
131 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ 147 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698