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 #include "remoting/protocol/channel_multiplexer.h" | 5 #include "remoting/protocol/channel_multiplexer.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 public: | 105 public: |
106 MuxSocket(MuxChannel* channel); | 106 MuxSocket(MuxChannel* channel); |
107 virtual ~MuxSocket(); | 107 virtual ~MuxSocket(); |
108 | 108 |
109 void OnWriteComplete(); | 109 void OnWriteComplete(); |
110 void OnWriteFailed(); | 110 void OnWriteFailed(); |
111 void OnPacketReceived(); | 111 void OnPacketReceived(); |
112 | 112 |
113 // net::StreamSocket interface. | 113 // net::StreamSocket interface. |
114 virtual int Read(net::IOBuffer* buffer, int buffer_len, | 114 virtual int Read(net::IOBuffer* buffer, int buffer_len, |
115 const net::CompletionCallback& callback) OVERRIDE; | 115 const net::CompletionCallback& callback) override; |
116 virtual int Write(net::IOBuffer* buffer, int buffer_len, | 116 virtual int Write(net::IOBuffer* buffer, int buffer_len, |
117 const net::CompletionCallback& callback) OVERRIDE; | 117 const net::CompletionCallback& callback) override; |
118 | 118 |
119 virtual int SetReceiveBufferSize(int32 size) OVERRIDE { | 119 virtual int SetReceiveBufferSize(int32 size) override { |
120 NOTIMPLEMENTED(); | 120 NOTIMPLEMENTED(); |
121 return net::ERR_NOT_IMPLEMENTED; | 121 return net::ERR_NOT_IMPLEMENTED; |
122 } | 122 } |
123 virtual int SetSendBufferSize(int32 size) OVERRIDE { | 123 virtual int SetSendBufferSize(int32 size) override { |
124 NOTIMPLEMENTED(); | 124 NOTIMPLEMENTED(); |
125 return net::ERR_NOT_IMPLEMENTED; | 125 return net::ERR_NOT_IMPLEMENTED; |
126 } | 126 } |
127 | 127 |
128 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE { | 128 virtual int Connect(const net::CompletionCallback& callback) override { |
129 NOTIMPLEMENTED(); | 129 NOTIMPLEMENTED(); |
130 return net::ERR_NOT_IMPLEMENTED; | 130 return net::ERR_NOT_IMPLEMENTED; |
131 } | 131 } |
132 virtual void Disconnect() OVERRIDE { | 132 virtual void Disconnect() override { |
133 NOTIMPLEMENTED(); | 133 NOTIMPLEMENTED(); |
134 } | 134 } |
135 virtual bool IsConnected() const OVERRIDE { | 135 virtual bool IsConnected() const override { |
136 NOTIMPLEMENTED(); | 136 NOTIMPLEMENTED(); |
137 return true; | 137 return true; |
138 } | 138 } |
139 virtual bool IsConnectedAndIdle() const OVERRIDE { | 139 virtual bool IsConnectedAndIdle() const override { |
140 NOTIMPLEMENTED(); | 140 NOTIMPLEMENTED(); |
141 return false; | 141 return false; |
142 } | 142 } |
143 virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE { | 143 virtual int GetPeerAddress(net::IPEndPoint* address) const override { |
144 NOTIMPLEMENTED(); | 144 NOTIMPLEMENTED(); |
145 return net::ERR_NOT_IMPLEMENTED; | 145 return net::ERR_NOT_IMPLEMENTED; |
146 } | 146 } |
147 virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE { | 147 virtual int GetLocalAddress(net::IPEndPoint* address) const override { |
148 NOTIMPLEMENTED(); | 148 NOTIMPLEMENTED(); |
149 return net::ERR_NOT_IMPLEMENTED; | 149 return net::ERR_NOT_IMPLEMENTED; |
150 } | 150 } |
151 virtual const net::BoundNetLog& NetLog() const OVERRIDE { | 151 virtual const net::BoundNetLog& NetLog() const override { |
152 NOTIMPLEMENTED(); | 152 NOTIMPLEMENTED(); |
153 return net_log_; | 153 return net_log_; |
154 } | 154 } |
155 virtual void SetSubresourceSpeculation() OVERRIDE { | 155 virtual void SetSubresourceSpeculation() override { |
156 NOTIMPLEMENTED(); | 156 NOTIMPLEMENTED(); |
157 } | 157 } |
158 virtual void SetOmniboxSpeculation() OVERRIDE { | 158 virtual void SetOmniboxSpeculation() override { |
159 NOTIMPLEMENTED(); | 159 NOTIMPLEMENTED(); |
160 } | 160 } |
161 virtual bool WasEverUsed() const OVERRIDE { | 161 virtual bool WasEverUsed() const override { |
162 return true; | 162 return true; |
163 } | 163 } |
164 virtual bool UsingTCPFastOpen() const OVERRIDE { | 164 virtual bool UsingTCPFastOpen() const override { |
165 return false; | 165 return false; |
166 } | 166 } |
167 virtual bool WasNpnNegotiated() const OVERRIDE { | 167 virtual bool WasNpnNegotiated() const override { |
168 return false; | 168 return false; |
169 } | 169 } |
170 virtual net::NextProto GetNegotiatedProtocol() const OVERRIDE { | 170 virtual net::NextProto GetNegotiatedProtocol() const override { |
171 return net::kProtoUnknown; | 171 return net::kProtoUnknown; |
172 } | 172 } |
173 virtual bool GetSSLInfo(net::SSLInfo* ssl_info) OVERRIDE { | 173 virtual bool GetSSLInfo(net::SSLInfo* ssl_info) override { |
174 NOTIMPLEMENTED(); | 174 NOTIMPLEMENTED(); |
175 return false; | 175 return false; |
176 } | 176 } |
177 | 177 |
178 private: | 178 private: |
179 MuxChannel* channel_; | 179 MuxChannel* channel_; |
180 | 180 |
181 net::CompletionCallback read_callback_; | 181 net::CompletionCallback read_callback_; |
182 scoped_refptr<net::IOBuffer> read_buffer_; | 182 scoped_refptr<net::IOBuffer> read_buffer_; |
183 int read_buffer_size_; | 183 int read_buffer_size_; |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 channel->OnIncomingPacket(packet.Pass(), done_task); | 503 channel->OnIncomingPacket(packet.Pass(), done_task); |
504 } | 504 } |
505 | 505 |
506 bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet, | 506 bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet, |
507 const base::Closure& done_task) { | 507 const base::Closure& done_task) { |
508 return writer_.Write(SerializeAndFrameMessage(*packet), done_task); | 508 return writer_.Write(SerializeAndFrameMessage(*packet), done_task); |
509 } | 509 } |
510 | 510 |
511 } // namespace protocol | 511 } // namespace protocol |
512 } // namespace remoting | 512 } // namespace remoting |
OLD | NEW |