| 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 <cstdint> | 8 #include <cstdint> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 public: | 196 public: |
| 197 MockSession(); | 197 MockSession(); |
| 198 ~MockSession() override; | 198 ~MockSession() override; |
| 199 | 199 |
| 200 MOCK_METHOD1(SetEventHandler, void(Session::EventHandler* event_handler)); | 200 MOCK_METHOD1(SetEventHandler, void(Session::EventHandler* event_handler)); |
| 201 MOCK_METHOD0(error, ErrorCode()); | 201 MOCK_METHOD0(error, ErrorCode()); |
| 202 MOCK_METHOD1(SetTransport, void(Transport*)); | 202 MOCK_METHOD1(SetTransport, void(Transport*)); |
| 203 MOCK_METHOD0(jid, const std::string&()); | 203 MOCK_METHOD0(jid, const std::string&()); |
| 204 MOCK_METHOD0(config, const SessionConfig&()); | 204 MOCK_METHOD0(config, const SessionConfig&()); |
| 205 MOCK_METHOD1(Close, void(ErrorCode error)); | 205 MOCK_METHOD1(Close, void(ErrorCode error)); |
| 206 void Attach(std::unique_ptr<SessionPlugin> plugin) override; |
| 206 | 207 |
| 207 private: | 208 private: |
| 208 DISALLOW_COPY_AND_ASSIGN(MockSession); | 209 DISALLOW_COPY_AND_ASSIGN(MockSession); |
| 209 }; | 210 }; |
| 210 | 211 |
| 211 class MockSessionManager : public SessionManager { | 212 class MockSessionManager : public SessionManager { |
| 212 public: | 213 public: |
| 213 MockSessionManager(); | 214 MockSessionManager(); |
| 214 ~MockSessionManager() override; | 215 ~MockSessionManager() override; |
| 215 | 216 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 // Runs tasks synchronously instead of posting them to |task_runner|. | 266 // Runs tasks synchronously instead of posting them to |task_runner|. |
| 266 void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 267 void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
| 267 const tracked_objects::Location& from_here, | 268 const tracked_objects::Location& from_here, |
| 268 const base::Closure& task) override; | 269 const base::Closure& task) override; |
| 269 }; | 270 }; |
| 270 | 271 |
| 271 } // namespace protocol | 272 } // namespace protocol |
| 272 } // namespace remoting | 273 } // namespace remoting |
| 273 | 274 |
| 274 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 275 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
| OLD | NEW |