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

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: Change authorization socket flag name 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
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
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 MOCK_METHOD1(OnClientConnected, void(const std::string& jid)); 122 MOCK_METHOD1(OnClientConnected, void(const std::string& jid));
120 MOCK_METHOD1(OnClientDisconnected, void(const std::string& jid)); 123 MOCK_METHOD1(OnClientDisconnected, void(const std::string& jid));
121 MOCK_METHOD3(OnClientRouteChange, 124 MOCK_METHOD3(OnClientRouteChange,
122 void(const std::string& jid, 125 void(const std::string& jid,
123 const std::string& channel_name, 126 const std::string& channel_name,
124 const protocol::TransportRoute& route)); 127 const protocol::TransportRoute& route));
125 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login)); 128 MOCK_METHOD1(OnStart, void(const std::string& xmpp_login));
126 MOCK_METHOD0(OnShutdown, void()); 129 MOCK_METHOD0(OnShutdown, void());
127 }; 130 };
128 131
132 class MockGnubbyAuthHandler : public GnubbyAuthHandler {
133 public:
134 MockGnubbyAuthHandler(protocol::ClientStub* client_stub);
135 virtual ~MockGnubbyAuthHandler();
136
137 MOCK_METHOD1(DeliverClientMessage, void(const std::string message));
138 MOCK_CONST_METHOD2(DeliverHostControlMessage,
139 void(const std::string control_type,
140 const std::string data));
141 MOCK_CONST_METHOD2(DeliverHostDataMessage,
142 void(int connection_id, const std::string data));
143
144 private:
145 DISALLOW_COPY_AND_ASSIGN(MockGnubbyAuthHandler);
146 };
147
129 } // namespace remoting 148 } // namespace remoting
130 149
131 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ 150 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698