| 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 #include "content/renderer/p2p/socket_client.h" | 5 #include "content/renderer/p2p/socket_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
| 9 #include "content/common/p2p_messages.h" | 9 #include "content/common/p2p_messages.h" |
| 10 #include "content/renderer/p2p/socket_dispatcher.h" | 10 #include "content/renderer/p2p/socket_dispatcher.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 P2PSocketClient::P2PSocketClient(P2PSocketDispatcher* dispatcher) | 14 P2PSocketClient::P2PSocketClient(P2PSocketDispatcher* dispatcher) |
| 15 : dispatcher_(dispatcher), | 15 : dispatcher_(dispatcher), |
| 16 ipc_message_loop_(dispatcher->message_loop()), | 16 ipc_message_loop_(dispatcher->message_loop()), |
| 17 delegate_message_loop_(base::MessageLoopProxy::current()), | 17 delegate_message_loop_(base::MessageLoopProxy::current()), |
| 18 socket_id_(0), delegate_(NULL), | 18 socket_id_(0), delegate_(NULL), |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 delegate_->OnDataReceived(address, data); | 177 delegate_->OnDataReceived(address, data); |
| 178 } | 178 } |
| 179 | 179 |
| 180 void P2PSocketClient::Detach() { | 180 void P2PSocketClient::Detach() { |
| 181 DCHECK(ipc_message_loop_->BelongsToCurrentThread()); | 181 DCHECK(ipc_message_loop_->BelongsToCurrentThread()); |
| 182 dispatcher_ = NULL; | 182 dispatcher_ = NULL; |
| 183 OnError(); | 183 OnError(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace content | 186 } // namespace content |
| OLD | NEW |