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

Side by Side Diff: remoting/host/host_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "remoting/host/capturer.h" 10 #include "remoting/host/capturer.h"
9 #include "remoting/host/curtain.h" 11 #include "remoting/host/curtain.h"
10 #include "remoting/host/chromoting_host_context.h" 12 #include "remoting/host/chromoting_host_context.h"
11 #include "remoting/host/client_session.h" 13 #include "remoting/host/client_session.h"
12 #include "remoting/host/continue_window.h" 14 #include "remoting/host/continue_window.h"
13 #include "remoting/host/disconnect_window.h" 15 #include "remoting/host/disconnect_window.h"
14 #include "remoting/host/event_executor.h" 16 #include "remoting/host/event_executor.h"
15 #include "remoting/host/local_input_monitor.h" 17 #include "remoting/host/local_input_monitor.h"
16 #include "remoting/host/user_authenticator.h" 18 #include "remoting/host/user_authenticator.h"
17 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
18 20
21 namespace net {
22 class IpEndPoint;
Sergey Ulanov 2012/01/25 01:56:48 remove this
Lambros 2012/01/25 19:27:10 Done.
23 } // namespace net
24
19 namespace remoting { 25 namespace remoting {
20 26
21 class MockCapturer : public Capturer { 27 class MockCapturer : public Capturer {
22 public: 28 public:
23 MockCapturer(); 29 MockCapturer();
24 virtual ~MockCapturer(); 30 virtual ~MockCapturer();
25 31
26 MOCK_METHOD0(ScreenConfigurationChanged, void()); 32 MOCK_METHOD0(ScreenConfigurationChanged, void());
27 MOCK_CONST_METHOD0(pixel_format, media::VideoFrame::Format()); 33 MOCK_CONST_METHOD0(pixel_format, media::VideoFrame::Format());
28 MOCK_METHOD0(ClearInvalidRegion, void()); 34 MOCK_METHOD0(ClearInvalidRegion, void());
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 public: 102 public:
97 MockClientSessionEventHandler(); 103 MockClientSessionEventHandler();
98 virtual ~MockClientSessionEventHandler(); 104 virtual ~MockClientSessionEventHandler();
99 105
100 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client)); 106 MOCK_METHOD1(OnSessionAuthenticated, void(ClientSession* client));
101 MOCK_METHOD1(OnSessionAuthenticationFailed, void(ClientSession* client)); 107 MOCK_METHOD1(OnSessionAuthenticationFailed, void(ClientSession* client));
102 MOCK_METHOD1(OnSessionClosed, void(ClientSession* client)); 108 MOCK_METHOD1(OnSessionClosed, void(ClientSession* client));
103 MOCK_METHOD1(OnSessionFailed, void(ClientSession* client)); 109 MOCK_METHOD1(OnSessionFailed, void(ClientSession* client));
104 MOCK_METHOD2(OnSessionSequenceNumber, void(ClientSession* client, 110 MOCK_METHOD2(OnSessionSequenceNumber, void(ClientSession* client,
105 int64 sequence_number)); 111 int64 sequence_number));
112 MOCK_METHOD3(OnSessionIpEndPoint, void(ClientSession* client,
113 const std::string& channel_name,
114 const net::IPEndPoint& end_point));
115
106 private: 116 private:
107 DISALLOW_COPY_AND_ASSIGN(MockClientSessionEventHandler); 117 DISALLOW_COPY_AND_ASSIGN(MockClientSessionEventHandler);
108 }; 118 };
109 119
110 class MockEventExecutor : public EventExecutor { 120 class MockEventExecutor : public EventExecutor {
111 public: 121 public:
112 MockEventExecutor(); 122 MockEventExecutor();
113 virtual ~MockEventExecutor(); 123 virtual ~MockEventExecutor();
114 124
115 MOCK_METHOD1(InjectKeyEvent, void(const protocol::KeyEvent& event)); 125 MOCK_METHOD1(InjectKeyEvent, void(const protocol::KeyEvent& event));
(...skipping 11 matching lines...) Expand all
127 MOCK_METHOD2(Authenticate, bool(const std::string& username, 137 MOCK_METHOD2(Authenticate, bool(const std::string& username,
128 const std::string& password)); 138 const std::string& password));
129 139
130 private: 140 private:
131 DISALLOW_COPY_AND_ASSIGN(MockUserAuthenticator); 141 DISALLOW_COPY_AND_ASSIGN(MockUserAuthenticator);
132 }; 142 };
133 143
134 } // namespace remoting 144 } // namespace remoting
135 145
136 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ 146 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698