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

Side by Side Diff: remoting/protocol/protocol_mock_objects.h

Issue 9288010: More plumbing for logging connection IP addresses (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ 5 #ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ 6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "remoting/proto/internal.pb.h" 10 #include "remoting/proto/internal.pb.h"
11 #include "remoting/protocol/client_stub.h" 11 #include "remoting/protocol/client_stub.h"
12 #include "remoting/protocol/connection_to_client.h" 12 #include "remoting/protocol/connection_to_client.h"
13 #include "remoting/protocol/host_stub.h" 13 #include "remoting/protocol/host_stub.h"
14 #include "remoting/protocol/input_stub.h" 14 #include "remoting/protocol/input_stub.h"
15 #include "remoting/protocol/session.h" 15 #include "remoting/protocol/session.h"
16 #include "remoting/protocol/video_stub.h" 16 #include "remoting/protocol/video_stub.h"
17 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
18 18
19 namespace net {
20 class IpEndPoint;
21 } // namespace net
22
19 namespace remoting { 23 namespace remoting {
20 namespace protocol { 24 namespace protocol {
21 25
22 class MockConnectionToClient : public ConnectionToClient { 26 class MockConnectionToClient : public ConnectionToClient {
23 public: 27 public:
24 MockConnectionToClient(Session* session, 28 MockConnectionToClient(Session* session,
25 HostStub* host_stub, 29 HostStub* host_stub,
26 InputStub* input_stub); 30 InputStub* input_stub);
27 virtual ~MockConnectionToClient(); 31 virtual ~MockConnectionToClient();
28 32
(...skipping 12 matching lines...) Expand all
41 public: 45 public:
42 MockConnectionToClientEventHandler(); 46 MockConnectionToClientEventHandler();
43 virtual ~MockConnectionToClientEventHandler(); 47 virtual ~MockConnectionToClientEventHandler();
44 48
45 MOCK_METHOD1(OnConnectionOpened, void(ConnectionToClient* connection)); 49 MOCK_METHOD1(OnConnectionOpened, void(ConnectionToClient* connection));
46 MOCK_METHOD1(OnConnectionClosed, void(ConnectionToClient* connection)); 50 MOCK_METHOD1(OnConnectionClosed, void(ConnectionToClient* connection));
47 MOCK_METHOD2(OnConnectionFailed, void(ConnectionToClient* connection, 51 MOCK_METHOD2(OnConnectionFailed, void(ConnectionToClient* connection,
48 Session::Error error)); 52 Session::Error error));
49 MOCK_METHOD2(OnSequenceNumberUpdated, void(ConnectionToClient* connection, 53 MOCK_METHOD2(OnSequenceNumberUpdated, void(ConnectionToClient* connection,
50 int64 sequence_number)); 54 int64 sequence_number));
55 MOCK_METHOD3(OnClientIpEndPoint, void(ConnectionToClient* connection,
56 const std::string& channel_name,
57 const net::IPEndPoint& end_point));
51 58
52 private: 59 private:
53 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler); 60 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler);
54 }; 61 };
55 62
56 class MockInputStub : public InputStub { 63 class MockInputStub : public InputStub {
57 public: 64 public:
58 MockInputStub(); 65 MockInputStub();
59 virtual ~MockInputStub(); 66 virtual ~MockInputStub();
60 67
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 MOCK_METHOD0(Close, void()); 136 MOCK_METHOD0(Close, void());
130 137
131 private: 138 private:
132 DISALLOW_COPY_AND_ASSIGN(MockSession); 139 DISALLOW_COPY_AND_ASSIGN(MockSession);
133 }; 140 };
134 141
135 } // namespace protocol 142 } // namespace protocol
136 } // namespace remoting 143 } // namespace remoting
137 144
138 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ 145 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698