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

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

Issue 20003004: reland crrev.com/212927 Move webkitplatformsupport_impl and related from glue to child (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & allocator dep for components_unittests in shared_library2 Created 7 years, 5 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/resource_messages.cc ('k') | content/content_child.gypi » ('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_handle_data.h" 5 #include "content/common/socket_stream_handle_data.h"
6 6
7 #include "webkit/glue/websocketstreamhandle_impl.h" 7 #include "webkit/child/websocketstreamhandle_impl.h"
8 8
9 using webkit_glue::WebSocketStreamHandleImpl; 9 using webkit_glue::WebSocketStreamHandleImpl;
10 using WebKit::WebSocketStreamHandle; 10 using WebKit::WebSocketStreamHandle;
11 11
12 namespace content { 12 namespace content {
13 13
14 // static 14 // static
15 void SocketStreamHandleData::AddToHandle( 15 void SocketStreamHandleData::AddToHandle(
16 WebSocketStreamHandle* handle, int render_view_id) { 16 WebSocketStreamHandle* handle, int render_view_id) {
17 if (!handle) { 17 if (!handle) {
18 NOTREACHED(); 18 NOTREACHED();
19 return; 19 return;
20 } 20 }
21 WebSocketStreamHandleImpl* impl = 21 WebSocketStreamHandleImpl* impl =
22 static_cast<WebSocketStreamHandleImpl*>(handle); 22 static_cast<WebSocketStreamHandleImpl*>(handle);
23 impl->SetUserData(handle, new SocketStreamHandleData(render_view_id)); 23 impl->SetUserData(handle, new SocketStreamHandleData(render_view_id));
24 } 24 }
25 25
26 // static 26 // static
27 const SocketStreamHandleData* SocketStreamHandleData::ForHandle( 27 const SocketStreamHandleData* SocketStreamHandleData::ForHandle(
28 WebSocketStreamHandle* handle) { 28 WebSocketStreamHandle* handle) {
29 if (!handle) 29 if (!handle)
30 return NULL; 30 return NULL;
31 WebSocketStreamHandleImpl* impl = 31 WebSocketStreamHandleImpl* impl =
32 static_cast<WebSocketStreamHandleImpl*>(handle); 32 static_cast<WebSocketStreamHandleImpl*>(handle);
33 return static_cast<SocketStreamHandleData*>(impl->GetUserData(handle)); 33 return static_cast<SocketStreamHandleData*>(impl->GetUserData(handle));
34 } 34 }
35 35
36 } // namespace content 36 } // namespace content
OLDNEW
« no previous file with comments | « content/common/resource_messages.cc ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698