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

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

Issue 138753005: Add gnubby authentication to remoting host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows warning Created 6 years, 10 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
« no previous file with comments | « remoting/host/gnubby_util_unittest.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>
9
8 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
9 #include "remoting/host/chromoting_host_context.h" 11 #include "remoting/host/chromoting_host_context.h"
10 #include "remoting/host/client_session.h" 12 #include "remoting/host/client_session.h"
11 #include "remoting/host/client_session_control.h" 13 #include "remoting/host/client_session_control.h"
12 #include "remoting/host/desktop_environment.h" 14 #include "remoting/host/desktop_environment.h"
15 #include "remoting/host/gnubby_auth_handler.h"
13 #include "remoting/host/host_status_observer.h" 16 #include "remoting/host/host_status_observer.h"
14 #include "remoting/host/input_injector.h" 17 #include "remoting/host/input_injector.h"
15 #include "remoting/host/screen_controls.h" 18 #include "remoting/host/screen_controls.h"
16 #include "remoting/host/screen_resolution.h" 19 #include "remoting/host/screen_resolution.h"
17 #include "remoting/proto/control.pb.h" 20 #include "remoting/proto/control.pb.h"
18 #include "testing/gmock/include/gmock/gmock.h" 21 #include "testing/gmock/include/gmock/gmock.h"
19 22
20 namespace base { 23 namespace base {
21 class SingleThreadTaskRunner; 24 class SingleThreadTaskRunner;
22 } // namespace base 25 } // namespace base
23 26
24 namespace remoting { 27 namespace remoting {
25 28
26 class MockDesktopEnvironment : public DesktopEnvironment { 29 class MockDesktopEnvironment : public DesktopEnvironment {
27 public: 30 public:
28 MockDesktopEnvironment(); 31 MockDesktopEnvironment();
29 virtual ~MockDesktopEnvironment(); 32 virtual ~MockDesktopEnvironment();
30 33
31 MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*()); 34 MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*());
32 MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*()); 35 MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*());
33 MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*()); 36 MOCK_METHOD0(CreateScreenControlsPtr, ScreenControls*());
34 MOCK_METHOD0(CreateVideoCapturerPtr, webrtc::ScreenCapturer*()); 37 MOCK_METHOD0(CreateVideoCapturerPtr, webrtc::ScreenCapturer*());
35 MOCK_CONST_METHOD0(GetCapabilities, std::string()); 38 MOCK_CONST_METHOD0(GetCapabilities, std::string());
36 MOCK_METHOD1(SetCapabilities, void(const std::string&)); 39 MOCK_METHOD1(SetCapabilities, void(const std::string&));
40 MOCK_METHOD1(CreateGnubbyAuthHandlerPtr, GnubbyAuthHandler*(
41 protocol::ClientStub* client_stub));
37 42
38 // DesktopEnvironment implementation. 43 // DesktopEnvironment implementation.
39 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE; 44 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE;
40 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; 45 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE;
41 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; 46 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE;
42 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE; 47 virtual scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer() OVERRIDE;
48 virtual scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
49 protocol::ClientStub* client_stub) OVERRIDE;
43 }; 50 };
44 51
45 class MockClientSessionControl : public ClientSessionControl { 52 class MockClientSessionControl : public ClientSessionControl {
46 public: 53 public:
47 MockClientSessionControl(); 54 MockClientSessionControl();
48 virtual ~MockClientSessionControl(); 55 virtual ~MockClientSessionControl();
49 56
50 MOCK_CONST_METHOD0(client_jid, const std::string&()); 57 MOCK_CONST_METHOD0(client_jid, const std::string&());
51 MOCK_METHOD0(DisconnectSession, void()); 58 MOCK_METHOD0(DisconnectSession, void());
52 MOCK_METHOD1(OnLocalMouseMoved, void(const webrtc::DesktopVector&)); 59 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)); 126 MOCK_METHOD1(OnClientConnected, void(const std::string& jid));
120 MOCK_METHOD1(OnClientDisconnected, void(const std::string& jid)); 127 MOCK_METHOD1(OnClientDisconnected, void(const std::string& jid));
121 MOCK_METHOD3(OnClientRouteChange, 128 MOCK_METHOD3(OnClientRouteChange,
122 void(const std::string& jid, 129 void(const std::string& jid,
123 const std::string& channel_name, 130 const std::string& channel_name,
124 const protocol::TransportRoute& route)); 131 const protocol::TransportRoute& route));
125 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); 132 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login));
126 MOCK_METHOD0(OnShutdown, void()); 133 MOCK_METHOD0(OnShutdown, void());
127 }; 134 };
128 135
136 class MockGnubbyAuthHandler : public GnubbyAuthHandler {
137 public:
138 MockGnubbyAuthHandler();
139 virtual ~MockGnubbyAuthHandler();
140
141 MOCK_METHOD1(DeliverClientMessage, void(const std::string& message));
142 MOCK_CONST_METHOD2(DeliverHostDataMessage,
143 void(int connection_id, const std::string& data));
144
145 private:
146 DISALLOW_COPY_AND_ASSIGN(MockGnubbyAuthHandler);
147 };
148
129 } // namespace remoting 149 } // namespace remoting
130 150
131 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ 151 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
OLDNEW
« no previous file with comments | « remoting/host/gnubby_util_unittest.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698