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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 implementation. | 51 // net::Socket implementation. |
52 virtual int Read(net::IOBuffer* buf, int buf_len, | 52 virtual int Read(net::IOBuffer* buf, int buf_len, |
53 net::OldCompletionCallback* callback) OVERRIDE; | 53 net::OldCompletionCallback* callback) OVERRIDE; |
54 virtual int Read(net::IOBuffer* buf, int buf_len, | 54 virtual int Read(net::IOBuffer* buf, int buf_len, |
55 const net::CompletionCallback& callback) OVERRIDE; | 55 const net::CompletionCallback& callback) OVERRIDE; |
56 virtual int Write(net::IOBuffer* buf, int buf_len, | 56 virtual int Write(net::IOBuffer* buf, int buf_len, |
57 net::OldCompletionCallback* callback) OVERRIDE; | 57 net::OldCompletionCallback* callback) OVERRIDE; |
| 58 virtual int Write(net::IOBuffer* buf, int buf_len, |
| 59 const net::CompletionCallback& callback) OVERRIDE; |
58 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 60 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
59 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 61 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
60 | 62 |
61 // net::StreamSocket implementation. | 63 // net::StreamSocket implementation. |
62 virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE; | 64 virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE; |
63 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE; | 65 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE; |
64 virtual void Disconnect() OVERRIDE; | 66 virtual void Disconnect() OVERRIDE; |
65 virtual bool IsConnected() const OVERRIDE; | 67 virtual bool IsConnected() const OVERRIDE; |
66 virtual bool IsConnectedAndIdle() const OVERRIDE; | 68 virtual bool IsConnectedAndIdle() const OVERRIDE; |
67 virtual int GetPeerAddress(net::AddressList* address) const OVERRIDE; | 69 virtual int GetPeerAddress(net::AddressList* address) const OVERRIDE; |
(...skipping 23 matching lines...) Expand all Loading... |
91 net::OldCompletionCallback* old_connect_callback_; | 93 net::OldCompletionCallback* old_connect_callback_; |
92 net::CompletionCallback connect_callback_; | 94 net::CompletionCallback connect_callback_; |
93 bool connected_; | 95 bool connected_; |
94 | 96 |
95 bool get_address_pending_; | 97 bool get_address_pending_; |
96 | 98 |
97 net::OldCompletionCallback* old_read_callback_; | 99 net::OldCompletionCallback* old_read_callback_; |
98 net::CompletionCallback read_callback_; | 100 net::CompletionCallback read_callback_; |
99 scoped_refptr<net::IOBuffer> read_buffer_; | 101 scoped_refptr<net::IOBuffer> read_buffer_; |
100 | 102 |
101 net::OldCompletionCallback* write_callback_; | 103 net::OldCompletionCallback* old_write_callback_; |
| 104 net::CompletionCallback write_callback_; |
102 scoped_refptr<net::IOBuffer> write_buffer_; | 105 scoped_refptr<net::IOBuffer> write_buffer_; |
103 | 106 |
104 net::BoundNetLog net_log_; | 107 net::BoundNetLog net_log_; |
105 | 108 |
106 pp::CompletionCallbackFactory<PepperTransportSocketAdapter> callback_factory_; | 109 pp::CompletionCallbackFactory<PepperTransportSocketAdapter> callback_factory_; |
107 | 110 |
108 DISALLOW_COPY_AND_ASSIGN(PepperTransportSocketAdapter); | 111 DISALLOW_COPY_AND_ASSIGN(PepperTransportSocketAdapter); |
109 }; | 112 }; |
110 | 113 |
111 } // namespace protocol | 114 } // namespace protocol |
112 } // namespace remoting | 115 } // namespace remoting |
113 | 116 |
114 #endif // REMOTING_PROTOCOL_PEPPER_TRANSPORT_SOCKET_ADAPTER_H_ | 117 #endif // REMOTING_PROTOCOL_PEPPER_TRANSPORT_SOCKET_ADAPTER_H_ |
OLD | NEW |