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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 bool SetReceiveBufferSize(int32 size) OVERRIDE { | 119 virtual int SetReceiveBufferSize(int32 size) OVERRIDE { |
120 NOTIMPLEMENTED(); | 120 NOTIMPLEMENTED(); |
121 return false; | 121 return net::ERR_NOT_IMPLEMENTED; |
122 } | 122 } |
123 virtual bool SetSendBufferSize(int32 size) OVERRIDE { | 123 virtual int SetSendBufferSize(int32 size) OVERRIDE { |
124 NOTIMPLEMENTED(); | 124 NOTIMPLEMENTED(); |
125 return false; | 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_FAILED; | 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_FAILED; | 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_FAILED; | 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(); |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 channel->OnIncomingPacket(packet.Pass(), done_task); | 510 channel->OnIncomingPacket(packet.Pass(), done_task); |
511 } | 511 } |
512 | 512 |
513 bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet, | 513 bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet, |
514 const base::Closure& done_task) { | 514 const base::Closure& done_task) { |
515 return writer_.Write(SerializeAndFrameMessage(*packet), done_task); | 515 return writer_.Write(SerializeAndFrameMessage(*packet), done_task); |
516 } | 516 } |
517 | 517 |
518 } // namespace protocol | 518 } // namespace protocol |
519 } // namespace remoting | 519 } // namespace remoting |
OLD | NEW |