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

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

Issue 12545026: ResizingHostObserver is created by the desktop environment together with other stubs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback & 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_proxy.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" 14 #include "remoting/host/event_executor.h"
15 #include "remoting/host/host_status_observer.h" 15 #include "remoting/host/host_status_observer.h"
16 #include "remoting/host/local_input_monitor.h" 16 #include "remoting/host/local_input_monitor.h"
17 #include "remoting/host/session_controller.h"
17 #include "remoting/proto/control.pb.h" 18 #include "remoting/proto/control.pb.h"
18 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.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_METHOD1(CreateAudioCapturerPtr, 32 MOCK_METHOD1(CreateAudioCapturerPtr,
32 AudioCapturer*(scoped_refptr<base::SingleThreadTaskRunner>)); 33 AudioCapturer*(scoped_refptr<base::SingleThreadTaskRunner>));
33 MOCK_METHOD2(CreateEventExecutorPtr, 34 MOCK_METHOD2(CreateEventExecutorPtr,
34 EventExecutor*(scoped_refptr<base::SingleThreadTaskRunner>, 35 EventExecutor*(scoped_refptr<base::SingleThreadTaskRunner>,
35 scoped_refptr<base::SingleThreadTaskRunner>)); 36 scoped_refptr<base::SingleThreadTaskRunner>));
37 MOCK_METHOD0(CreateSessionControllerPtr, SessionController*());
36 MOCK_METHOD2( 38 MOCK_METHOD2(
37 CreateVideoCapturerPtr, 39 CreateVideoCapturerPtr,
38 media::ScreenCapturer*(scoped_refptr<base::SingleThreadTaskRunner>, 40 media::ScreenCapturer*(scoped_refptr<base::SingleThreadTaskRunner>,
39 scoped_refptr<base::SingleThreadTaskRunner>)); 41 scoped_refptr<base::SingleThreadTaskRunner>));
40 42
41 // DesktopEnvironment implementation. 43 // DesktopEnvironment implementation.
42 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer( 44 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer(
43 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) OVERRIDE; 45 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) OVERRIDE;
44 virtual scoped_ptr<EventExecutor> CreateEventExecutor( 46 virtual scoped_ptr<EventExecutor> CreateEventExecutor(
45 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 47 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
46 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) OVERRIDE; 48 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) OVERRIDE;
49 virtual scoped_ptr<SessionController> CreateSessionController() OVERRIDE;
47 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer( 50 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer(
48 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, 51 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
49 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE; 52 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE;
50 }; 53 };
51 54
52 class MockDisconnectWindow : public DisconnectWindow { 55 class MockDisconnectWindow : public DisconnectWindow {
53 public: 56 public:
54 MockDisconnectWindow(); 57 MockDisconnectWindow();
55 virtual ~MockDisconnectWindow(); 58 virtual ~MockDisconnectWindow();
56 59
(...skipping 30 matching lines...) Expand all
87 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); 90 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client));
88 MOCK_METHOD1(OnSessionChannelsConnected, void(ClientSession* client)); 91 MOCK_METHOD1(OnSessionChannelsConnected, void(ClientSession* client));
89 MOCK_METHOD1(OnSessionAuthenticationFailed, void(ClientSession* client)); 92 MOCK_METHOD1(OnSessionAuthenticationFailed, void(ClientSession* client));
90 MOCK_METHOD1(OnSessionClosed, void(ClientSession* client)); 93 MOCK_METHOD1(OnSessionClosed, void(ClientSession* client));
91 MOCK_METHOD2(OnSessionSequenceNumber, void(ClientSession* client, 94 MOCK_METHOD2(OnSessionSequenceNumber, void(ClientSession* client,
92 int64 sequence_number)); 95 int64 sequence_number));
93 MOCK_METHOD3(OnSessionRouteChange, void( 96 MOCK_METHOD3(OnSessionRouteChange, void(
94 ClientSession* client, 97 ClientSession* client,
95 const std::string& channel_name, 98 const std::string& channel_name,
96 const protocol::TransportRoute& route)); 99 const protocol::TransportRoute& route));
97 MOCK_METHOD3(OnClientResolutionChanged, void(ClientSession* client,
98 const SkISize& size,
99 const SkIPoint& dpi));
100 100
101 private: 101 private:
102 DISALLOW_COPY_AND_ASSIGN(MockClientSessionEventHandler); 102 DISALLOW_COPY_AND_ASSIGN(MockClientSessionEventHandler);
103 }; 103 };
104 104
105 class MockDesktopEnvironmentFactory : public DesktopEnvironmentFactory { 105 class MockDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
106 public: 106 public:
107 MockDesktopEnvironmentFactory(); 107 MockDesktopEnvironmentFactory();
108 virtual ~MockDesktopEnvironmentFactory(); 108 virtual ~MockDesktopEnvironmentFactory();
109 109
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 MOCK_METHOD1(OnClientConnected, void(const std::string& jid)); 146 MOCK_METHOD1(OnClientConnected, void(const std::string& jid));
147 MOCK_METHOD1(OnClientDisconnected, void(const std::string& jid)); 147 MOCK_METHOD1(OnClientDisconnected, void(const std::string& jid));
148 MOCK_METHOD3(OnClientRouteChange, 148 MOCK_METHOD3(OnClientRouteChange,
149 void(const std::string& jid, 149 void(const std::string& jid,
150 const std::string& channel_name, 150 const std::string& channel_name,
151 const protocol::TransportRoute& route)); 151 const protocol::TransportRoute& route));
152 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); 152 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login));
153 MOCK_METHOD0(OnShutdown, void()); 153 MOCK_METHOD0(OnShutdown, void());
154 }; 154 };
155 155
156 class MockSessionController : public SessionController {
157 public:
158 MockSessionController();
159 virtual ~MockSessionController();
160
161 MOCK_METHOD2(OnClientResolutionChanged,
162 void(const SkIPoint&, const SkISize&));
163
164 private:
165 DISALLOW_COPY_AND_ASSIGN(MockSessionController);
166 };
167
156 } // namespace remoting 168 } // namespace remoting
157 169
158 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ 170 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698