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_dispatcher.h" | 5 #include "content/renderer/p2p/socket_dispatcher.h" |
6 | 6 |
7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
8 #include "content/common/p2p_messages.h" | 8 #include "content/common/p2p_messages.h" |
9 #include "content/renderer/p2p/host_address_request.h" | 9 #include "content/renderer/p2p/host_address_request.h" |
10 #include "content/renderer/p2p/socket_client.h" | 10 #include "content/renderer/p2p/socket_client.h" |
11 #include "content/renderer/render_view.h" | 11 #include "content/renderer/render_view_impl.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 P2PSocketDispatcher::P2PSocketDispatcher(RenderView* render_view) | 15 P2PSocketDispatcher::P2PSocketDispatcher(RenderViewImpl* render_view) |
16 : content::RenderViewObserver(render_view), | 16 : content::RenderViewObserver(render_view), |
17 message_loop_(base::MessageLoopProxy::current()), | 17 message_loop_(base::MessageLoopProxy::current()), |
18 network_notifications_started_(false), | 18 network_notifications_started_(false), |
19 network_list_observers_( | 19 network_list_observers_( |
20 new ObserverListThreadSafe<NetworkListObserver>()) { | 20 new ObserverListThreadSafe<NetworkListObserver>()) { |
21 } | 21 } |
22 | 22 |
23 P2PSocketDispatcher::~P2PSocketDispatcher() { | 23 P2PSocketDispatcher::~P2PSocketDispatcher() { |
24 if (network_notifications_started_) | 24 if (network_notifications_started_) |
25 Send(new P2PHostMsg_StopNetworkNotifications(routing_id())); | 25 Send(new P2PHostMsg_StopNetworkNotifications(routing_id())); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // hasn't processed the close message by the time it sends the | 140 // hasn't processed the close message by the time it sends the |
141 // message to the renderer. | 141 // message to the renderer. |
142 VLOG(1) << "Received P2P message for socket that doesn't exist."; | 142 VLOG(1) << "Received P2P message for socket that doesn't exist."; |
143 return NULL; | 143 return NULL; |
144 } | 144 } |
145 | 145 |
146 return client; | 146 return client; |
147 } | 147 } |
148 | 148 |
149 } // namespace content | 149 } // namespace content |
OLD | NEW |