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

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

Issue 185553014: Revert "Revert 254514 "Revert 254507 "Reland "Move WebKitPlatformSupport..."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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_handle_data.h ('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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/common/socket_stream_handle_data.h"
6
7 #include "webkit/child/websocketstreamhandle_impl.h"
8
9 using webkit_glue::WebSocketStreamHandleImpl;
10 using blink::WebSocketStreamHandle;
11
12 namespace content {
13
14 // static
15 void SocketStreamHandleData::AddToHandle(
16 WebSocketStreamHandle* handle, int render_frame_id) {
17 if (!handle) {
18 NOTREACHED();
19 return;
20 }
21 WebSocketStreamHandleImpl* impl =
22 static_cast<WebSocketStreamHandleImpl*>(handle);
23 impl->SetUserData(handle, new SocketStreamHandleData(render_frame_id));
24 }
25
26 // static
27 const SocketStreamHandleData* SocketStreamHandleData::ForHandle(
28 WebSocketStreamHandle* handle) {
29 if (!handle)
30 return NULL;
31 WebSocketStreamHandleImpl* impl =
32 static_cast<WebSocketStreamHandleImpl*>(handle);
33 return static_cast<SocketStreamHandleData*>(impl->GetUserData(handle));
34 }
35
36 } // namespace content
OLDNEW
« no previous file with comments | « content/common/socket_stream_handle_data.h ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698