OLD | NEW |
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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 MockSession(); | 200 MockSession(); |
201 ~MockSession() override; | 201 ~MockSession() override; |
202 | 202 |
203 MOCK_METHOD1(SetEventHandler, void(Session::EventHandler* event_handler)); | 203 MOCK_METHOD1(SetEventHandler, void(Session::EventHandler* event_handler)); |
204 MOCK_METHOD0(error, ErrorCode()); | 204 MOCK_METHOD0(error, ErrorCode()); |
205 MOCK_METHOD0(GetTransportChannelFactory, StreamChannelFactory*()); | 205 MOCK_METHOD0(GetTransportChannelFactory, StreamChannelFactory*()); |
206 MOCK_METHOD0(GetMultiplexedChannelFactory, StreamChannelFactory*()); | 206 MOCK_METHOD0(GetMultiplexedChannelFactory, StreamChannelFactory*()); |
207 MOCK_METHOD0(jid, const std::string&()); | 207 MOCK_METHOD0(jid, const std::string&()); |
208 MOCK_METHOD0(candidate_config, const CandidateSessionConfig*()); | 208 MOCK_METHOD0(candidate_config, const CandidateSessionConfig*()); |
209 MOCK_METHOD0(config, const SessionConfig&()); | 209 MOCK_METHOD0(config, const SessionConfig&()); |
210 MOCK_METHOD1(set_config_ptr, void(const SessionConfig* config)); | 210 MOCK_METHOD1(set_config, void(const SessionConfig& config)); |
211 void set_config(scoped_ptr<SessionConfig> config) override { | |
212 set_config_ptr(config.get()); | |
213 } | |
214 MOCK_METHOD0(initiator_token, const std::string&()); | 211 MOCK_METHOD0(initiator_token, const std::string&()); |
215 MOCK_METHOD1(set_initiator_token, void(const std::string& initiator_token)); | 212 MOCK_METHOD1(set_initiator_token, void(const std::string& initiator_token)); |
216 MOCK_METHOD0(receiver_token, const std::string&()); | 213 MOCK_METHOD0(receiver_token, const std::string&()); |
217 MOCK_METHOD1(set_receiver_token, void(const std::string& receiver_token)); | 214 MOCK_METHOD1(set_receiver_token, void(const std::string& receiver_token)); |
218 MOCK_METHOD1(set_shared_secret, void(const std::string& secret)); | 215 MOCK_METHOD1(set_shared_secret, void(const std::string& secret)); |
219 MOCK_METHOD0(shared_secret, const std::string&()); | 216 MOCK_METHOD0(shared_secret, const std::string&()); |
220 MOCK_METHOD0(Close, void()); | 217 MOCK_METHOD0(Close, void()); |
221 | 218 |
222 private: | 219 private: |
223 DISALLOW_COPY_AND_ASSIGN(MockSession); | 220 DISALLOW_COPY_AND_ASSIGN(MockSession); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 // Runs tasks synchronously instead of posting them to |task_runner|. | 278 // Runs tasks synchronously instead of posting them to |task_runner|. |
282 void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 279 void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
283 const tracked_objects::Location& from_here, | 280 const tracked_objects::Location& from_here, |
284 const base::Closure& task) override; | 281 const base::Closure& task) override; |
285 }; | 282 }; |
286 | 283 |
287 } // namespace protocol | 284 } // namespace protocol |
288 } // namespace remoting | 285 } // namespace remoting |
289 | 286 |
290 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 287 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
OLD | NEW |