| 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_FAKE_SESSION_H_ | 5 #ifndef REMOTING_PROTOCOL_FAKE_SESSION_H_ |
| 6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_ | 6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 signaling_delay_ = signaling_delay; | 40 signaling_delay_ = signaling_delay; |
| 41 } | 41 } |
| 42 | 42 |
| 43 // Session interface. | 43 // Session interface. |
| 44 void SetEventHandler(EventHandler* event_handler) override; | 44 void SetEventHandler(EventHandler* event_handler) override; |
| 45 ErrorCode error() override; | 45 ErrorCode error() override; |
| 46 const std::string& jid() override; | 46 const std::string& jid() override; |
| 47 const SessionConfig& config() override; | 47 const SessionConfig& config() override; |
| 48 void SetTransport(Transport* transport) override; | 48 void SetTransport(Transport* transport) override; |
| 49 void Close(ErrorCode error) override; | 49 void Close(ErrorCode error) override; |
| 50 void AddPlugin(SessionPlugin* plugin) override; |
| 50 | 51 |
| 51 private: | 52 private: |
| 52 // Callback provided to the |transport_|. | 53 // Callback provided to the |transport_|. |
| 53 void SendTransportInfo(std::unique_ptr<buzz::XmlElement> transport_info); | 54 void SendTransportInfo(std::unique_ptr<buzz::XmlElement> transport_info); |
| 54 | 55 |
| 55 // Called by the |peer_| to deliver incoming |transport_info|. | 56 // Called by the |peer_| to deliver incoming |transport_info|. |
| 56 void ProcessTransportInfo(std::unique_ptr<buzz::XmlElement> transport_info); | 57 void ProcessTransportInfo(std::unique_ptr<buzz::XmlElement> transport_info); |
| 57 | 58 |
| 58 EventHandler* event_handler_ = nullptr; | 59 EventHandler* event_handler_ = nullptr; |
| 59 std::unique_ptr<SessionConfig> config_; | 60 std::unique_ptr<SessionConfig> config_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 71 | 72 |
| 72 base::WeakPtrFactory<FakeSession> weak_factory_; | 73 base::WeakPtrFactory<FakeSession> weak_factory_; |
| 73 | 74 |
| 74 DISALLOW_COPY_AND_ASSIGN(FakeSession); | 75 DISALLOW_COPY_AND_ASSIGN(FakeSession); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace protocol | 78 } // namespace protocol |
| 78 } // namespace remoting | 79 } // namespace remoting |
| 79 | 80 |
| 80 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_ | 81 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_ |
| OLD | NEW |