OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/webrtc_data_stream_adapter.h" | 5 #include "remoting/protocol/webrtc_data_stream_adapter.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/callback.h" | 9 #include "base/callback.h" |
8 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
9 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/macros.h" |
10 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
11 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
12 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
13 #include "remoting/base/compound_buffer.h" | 16 #include "remoting/base/compound_buffer.h" |
14 #include "remoting/protocol/p2p_stream_socket.h" | 17 #include "remoting/protocol/p2p_stream_socket.h" |
15 | 18 |
16 static const int kMaxSendBufferSize = 256 * 1024; | 19 static const int kMaxSendBufferSize = 256 * 1024; |
17 | 20 |
18 namespace remoting { | 21 namespace remoting { |
19 namespace protocol { | 22 namespace protocol { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 270 |
268 // The callback can delete the channel which also holds the callback | 271 // The callback can delete the channel which also holds the callback |
269 // object which may cause crash if the callback carries some arguments. Copy | 272 // object which may cause crash if the callback carries some arguments. Copy |
270 // the callback to stack to avoid this problem. | 273 // the callback to stack to avoid this problem. |
271 ChannelCreatedCallback callback = connected_callback; | 274 ChannelCreatedCallback callback = connected_callback; |
272 callback.Run(make_scoped_ptr(channel)); | 275 callback.Run(make_scoped_ptr(channel)); |
273 } | 276 } |
274 | 277 |
275 } // namespace protocol | 278 } // namespace protocol |
276 } // namespace remoting | 279 } // namespace remoting |
OLD | NEW |