| OLD | NEW |
| 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_PEPPER_TRANSPORT_SOCKET_ADAPTER_H_ | 5 #ifndef REMOTING_PROTOCOL_PEPPER_TRANSPORT_SOCKET_ADAPTER_H_ |
| 6 #define REMOTING_PROTOCOL_PEPPER_TRANSPORT_SOCKET_ADAPTER_H_ | 6 #define REMOTING_PROTOCOL_PEPPER_TRANSPORT_SOCKET_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // Observer is used to notify about new local candidates and | 31 // Observer is used to notify about new local candidates and |
| 32 // deletion of the adapter. | 32 // deletion of the adapter. |
| 33 class Observer { | 33 class Observer { |
| 34 public: | 34 public: |
| 35 Observer() { } | 35 Observer() { } |
| 36 virtual ~Observer() { } | 36 virtual ~Observer() { } |
| 37 virtual void OnChannelDeleted() = 0; | 37 virtual void OnChannelDeleted() = 0; |
| 38 virtual void OnChannelNewLocalCandidate(const std::string& candidate) = 0; | 38 virtual void OnChannelNewLocalCandidate(const std::string& candidate) = 0; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 PepperTransportSocketAdapter(pp::Instance* pp_instance, | 41 PepperTransportSocketAdapter(pp::Transport_Dev* transport, |
| 42 const std::string& name, | 42 const std::string& name, |
| 43 Observer* observer); | 43 Observer* observer); |
| 44 virtual ~PepperTransportSocketAdapter(); | 44 virtual ~PepperTransportSocketAdapter(); |
| 45 | 45 |
| 46 const std::string& name() { return name_; } | 46 const std::string& name() { return name_; } |
| 47 | 47 |
| 48 // Adds candidate received from the peer. | 48 // Adds candidate received from the peer. |
| 49 void AddRemoteCandidate(const std::string& candidate); | 49 void AddRemoteCandidate(const std::string& candidate); |
| 50 | 50 |
| 51 // net::Socket interface. | 51 // net::Socket interface. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 pp::CompletionCallbackFactory<PepperTransportSocketAdapter> callback_factory_; | 101 pp::CompletionCallbackFactory<PepperTransportSocketAdapter> callback_factory_; |
| 102 | 102 |
| 103 DISALLOW_COPY_AND_ASSIGN(PepperTransportSocketAdapter); | 103 DISALLOW_COPY_AND_ASSIGN(PepperTransportSocketAdapter); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 } // namespace protocol | 106 } // namespace protocol |
| 107 } // namespace remoting | 107 } // namespace remoting |
| 108 | 108 |
| 109 #endif // REMOTING_PROTOCOL_PEPPER_TRANSPORT_SOCKET_ADAPTER_H_ | 109 #endif // REMOTING_PROTOCOL_PEPPER_TRANSPORT_SOCKET_ADAPTER_H_ |
| OLD | NEW |