| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 virtual ~PepperTransportSocketAdapter(); | 43 virtual ~PepperTransportSocketAdapter(); |
| 44 | 44 |
| 45 const std::string& name() { return name_; } | 45 const std::string& name() { return name_; } |
| 46 | 46 |
| 47 // Adds candidate received from the peer. | 47 // Adds candidate received from the peer. |
| 48 void AddRemoteCandidate(const std::string& candidate); | 48 void AddRemoteCandidate(const std::string& candidate); |
| 49 | 49 |
| 50 // net::Socket implementation. | 50 // net::Socket implementation. |
| 51 virtual int Read(net::IOBuffer* buf, int buf_len, | 51 virtual int Read(net::IOBuffer* buf, int buf_len, |
| 52 net::OldCompletionCallback* callback) OVERRIDE; | 52 net::OldCompletionCallback* callback) OVERRIDE; |
| 53 virtual int Read(net::IOBuffer* buf, int buf_len, |
| 54 const net::CompletionCallback& callback) OVERRIDE; |
| 53 virtual int Write(net::IOBuffer* buf, int buf_len, | 55 virtual int Write(net::IOBuffer* buf, int buf_len, |
| 54 net::OldCompletionCallback* callback) OVERRIDE; | 56 net::OldCompletionCallback* callback) OVERRIDE; |
| 55 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 57 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
| 56 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 58 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
| 57 | 59 |
| 58 // net::StreamSocket implementation. | 60 // net::StreamSocket implementation. |
| 59 virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE; | 61 virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE; |
| 60 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE; | 62 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE; |
| 61 virtual void Disconnect() OVERRIDE; | 63 virtual void Disconnect() OVERRIDE; |
| 62 virtual bool IsConnected() const OVERRIDE; | 64 virtual bool IsConnected() const OVERRIDE; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 84 Observer* observer_; | 86 Observer* observer_; |
| 85 | 87 |
| 86 scoped_ptr<pp::Transport_Dev> transport_; | 88 scoped_ptr<pp::Transport_Dev> transport_; |
| 87 | 89 |
| 88 net::OldCompletionCallback* old_connect_callback_; | 90 net::OldCompletionCallback* old_connect_callback_; |
| 89 net::CompletionCallback connect_callback_; | 91 net::CompletionCallback connect_callback_; |
| 90 bool connected_; | 92 bool connected_; |
| 91 | 93 |
| 92 bool get_address_pending_; | 94 bool get_address_pending_; |
| 93 | 95 |
| 94 net::OldCompletionCallback* read_callback_; | 96 net::OldCompletionCallback* old_read_callback_; |
| 97 net::CompletionCallback read_callback_; |
| 95 scoped_refptr<net::IOBuffer> read_buffer_; | 98 scoped_refptr<net::IOBuffer> read_buffer_; |
| 96 | 99 |
| 97 net::OldCompletionCallback* write_callback_; | 100 net::OldCompletionCallback* write_callback_; |
| 98 scoped_refptr<net::IOBuffer> write_buffer_; | 101 scoped_refptr<net::IOBuffer> write_buffer_; |
| 99 | 102 |
| 100 net::BoundNetLog net_log_; | 103 net::BoundNetLog net_log_; |
| 101 | 104 |
| 102 pp::CompletionCallbackFactory<PepperTransportSocketAdapter> callback_factory_; | 105 pp::CompletionCallbackFactory<PepperTransportSocketAdapter> callback_factory_; |
| 103 | 106 |
| 104 DISALLOW_COPY_AND_ASSIGN(PepperTransportSocketAdapter); | 107 DISALLOW_COPY_AND_ASSIGN(PepperTransportSocketAdapter); |
| 105 }; | 108 }; |
| 106 | 109 |
| 107 } // namespace protocol | 110 } // namespace protocol |
| 108 } // namespace remoting | 111 } // namespace remoting |
| 109 | 112 |
| 110 #endif // REMOTING_PROTOCOL_PEPPER_TRANSPORT_SOCKET_ADAPTER_H_ | 113 #endif // REMOTING_PROTOCOL_PEPPER_TRANSPORT_SOCKET_ADAPTER_H_ |
| OLD | NEW |