Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: content/common/socket_stream_dispatcher.cc

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/socket_stream_dispatcher.h ('k') | content/common/webkitplatformsupport_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/common/socket_stream_dispatcher.h" 5 #include "content/common/socket_stream_dispatcher.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/id_map.h" 10 #include "base/id_map.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "content/common/child_thread.h" 14 #include "content/common/child_thread.h"
15 #include "content/common/socket_stream.h" 15 #include "content/common/socket_stream.h"
16 #include "content/common/socket_stream_handle_data.h" 16 #include "content/common/socket_stream_handle_data.h"
17 #include "content/common/socket_stream_messages.h" 17 #include "content/common/socket_stream_messages.h"
18 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
19 #include "webkit/glue/websocketstreamhandle_bridge.h" 19 #include "webkit/glue/websocketstreamhandle_bridge.h"
20 #include "webkit/glue/websocketstreamhandle_delegate.h" 20 #include "webkit/glue/websocketstreamhandle_delegate.h"
21 21
22 namespace content {
23
22 // IPCWebSocketStreamHandleBridge is owned by each SocketStreamHandle. 24 // IPCWebSocketStreamHandleBridge is owned by each SocketStreamHandle.
23 // It communicates with the main browser process via SocketStreamDispatcher. 25 // It communicates with the main browser process via SocketStreamDispatcher.
24 class IPCWebSocketStreamHandleBridge 26 class IPCWebSocketStreamHandleBridge
25 : public webkit_glue::WebSocketStreamHandleBridge { 27 : public webkit_glue::WebSocketStreamHandleBridge {
26 public: 28 public:
27 IPCWebSocketStreamHandleBridge( 29 IPCWebSocketStreamHandleBridge(
28 ChildThread* child_thread, 30 ChildThread* child_thread,
29 WebKit::WebSocketStreamHandle* handle, 31 WebKit::WebSocketStreamHandle* handle,
30 webkit_glue::WebSocketStreamHandleDelegate* delegate) 32 webkit_glue::WebSocketStreamHandleDelegate* delegate)
31 : socket_id_(content::kNoSocketId), 33 : socket_id_(content::kNoSocketId),
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 226 }
225 227
226 void SocketStreamDispatcher::OnClosed(int socket_id) { 228 void SocketStreamDispatcher::OnClosed(int socket_id) {
227 IPCWebSocketStreamHandleBridge* bridge = 229 IPCWebSocketStreamHandleBridge* bridge =
228 IPCWebSocketStreamHandleBridge::FromSocketId(socket_id); 230 IPCWebSocketStreamHandleBridge::FromSocketId(socket_id);
229 if (bridge) 231 if (bridge)
230 bridge->OnClosed(); 232 bridge->OnClosed();
231 else 233 else
232 DLOG(ERROR) << "No SocketStreamHandleBridge for socket_id=" << socket_id; 234 DLOG(ERROR) << "No SocketStreamHandleBridge for socket_id=" << socket_id;
233 } 235 }
236
237 } // namespace content
OLDNEW
« no previous file with comments | « content/common/socket_stream_dispatcher.h ('k') | content/common/webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698