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

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

Issue 7633009: Use MessageLoopProxy for network message loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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_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 "remoting/proto/internal.pb.h" 8 #include "remoting/proto/internal.pb.h"
9 #include "remoting/protocol/client_stub.h" 9 #include "remoting/protocol/client_stub.h"
10 #include "remoting/protocol/connection_to_client.h" 10 #include "remoting/protocol/connection_to_client.h"
11 #include "remoting/protocol/host_stub.h" 11 #include "remoting/protocol/host_stub.h"
12 #include "remoting/protocol/input_stub.h" 12 #include "remoting/protocol/input_stub.h"
13 #include "remoting/protocol/session.h" 13 #include "remoting/protocol/session.h"
14 #include "remoting/protocol/video_stub.h" 14 #include "remoting/protocol/video_stub.h"
15 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
16 16
17 namespace remoting { 17 namespace remoting {
18 namespace protocol { 18 namespace protocol {
19 19
20 class ChromotocolConnection; 20 class ChromotocolConnection;
21 21
22 class MockConnectionToClient : public ConnectionToClient { 22 class MockConnectionToClient : public ConnectionToClient {
23 public: 23 public:
24 MockConnectionToClient(MessageLoop* message_loop, 24 MockConnectionToClient(EventHandler* handler,
25 EventHandler* handler,
26 HostStub* host_stub, 25 HostStub* host_stub,
27 InputStub* input_stub); 26 InputStub* input_stub);
28 virtual ~MockConnectionToClient(); 27 virtual ~MockConnectionToClient();
29 28
30 MOCK_METHOD1(Init, void(Session* session)); 29 MOCK_METHOD1(Init, void(Session* session));
31 MOCK_METHOD0(video_stub, VideoStub*()); 30 MOCK_METHOD0(video_stub, VideoStub*());
32 MOCK_METHOD0(client_stub, ClientStub*()); 31 MOCK_METHOD0(client_stub, ClientStub*());
33 MOCK_METHOD0(session, Session*()); 32 MOCK_METHOD0(session, Session*());
34 MOCK_METHOD0(Disconnect, void()); 33 MOCK_METHOD0(Disconnect, void());
35 34
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 MOCK_METHOD2(CreateStreamChannel, void( 112 MOCK_METHOD2(CreateStreamChannel, void(
114 const std::string& name, const StreamChannelCallback& callback)); 113 const std::string& name, const StreamChannelCallback& callback));
115 MOCK_METHOD2(CreateDatagramChannel, void( 114 MOCK_METHOD2(CreateDatagramChannel, void(
116 const std::string& name, const DatagramChannelCallback& callback)); 115 const std::string& name, const DatagramChannelCallback& callback));
117 MOCK_METHOD0(control_channel, net::Socket*()); 116 MOCK_METHOD0(control_channel, net::Socket*());
118 MOCK_METHOD0(event_channel, net::Socket*()); 117 MOCK_METHOD0(event_channel, net::Socket*());
119 MOCK_METHOD0(video_channel, net::Socket*()); 118 MOCK_METHOD0(video_channel, net::Socket*());
120 MOCK_METHOD0(video_rtp_channel, net::Socket*()); 119 MOCK_METHOD0(video_rtp_channel, net::Socket*());
121 MOCK_METHOD0(video_rtcp_channel, net::Socket*()); 120 MOCK_METHOD0(video_rtcp_channel, net::Socket*());
122 MOCK_METHOD0(jid, const std::string&()); 121 MOCK_METHOD0(jid, const std::string&());
123 MOCK_METHOD0(message_loop, MessageLoop*());
124 MOCK_METHOD0(candidate_config, const CandidateSessionConfig*()); 122 MOCK_METHOD0(candidate_config, const CandidateSessionConfig*());
125 MOCK_METHOD0(config, const SessionConfig*()); 123 MOCK_METHOD0(config, const SessionConfig*());
126 MOCK_METHOD1(set_config, void(const SessionConfig* config)); 124 MOCK_METHOD1(set_config, void(const SessionConfig* config));
127 MOCK_METHOD0(initiator_token, const std::string&()); 125 MOCK_METHOD0(initiator_token, const std::string&());
128 MOCK_METHOD1(set_initiator_token, void(const std::string& initiator_token)); 126 MOCK_METHOD1(set_initiator_token, void(const std::string& initiator_token));
129 MOCK_METHOD0(receiver_token, const std::string&()); 127 MOCK_METHOD0(receiver_token, const std::string&());
130 MOCK_METHOD1(set_receiver_token, void(const std::string& receiver_token)); 128 MOCK_METHOD1(set_receiver_token, void(const std::string& receiver_token));
131 MOCK_METHOD1(set_shared_secret, void(const std::string& secret)); 129 MOCK_METHOD1(set_shared_secret, void(const std::string& secret));
132 MOCK_METHOD0(shared_secret, const std::string&()); 130 MOCK_METHOD0(shared_secret, const std::string&());
133 MOCK_METHOD0(Close, void()); 131 MOCK_METHOD0(Close, void());
134 132
135 private: 133 private:
136 DISALLOW_COPY_AND_ASSIGN(MockSession); 134 DISALLOW_COPY_AND_ASSIGN(MockSession);
137 }; 135 };
138 136
139 } // namespace protocol 137 } // namespace protocol
140 } // namespace remoting 138 } // namespace remoting
141 139
142 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ 140 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698