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