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

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

Issue 9677031: Bind RenderViewImpl routing_id to SocketStreamHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add CONTENT_EXPORT to ForHandle() Created 8 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/common/socket_stream_messages.h » ('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 (c) 2012 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/glue/websocketstreamhandle_impl.h"
8
9 using webkit_glue::WebSocketStreamHandleImpl;
10 using WebKit::WebSocketStreamHandle;
11
12 // static
13 void SocketStreamHandleData::AddToHandle(
14 WebSocketStreamHandle* handle, int render_view_id) {
15 if (!handle) {
16 NOTREACHED();
17 return;
18 }
19 WebSocketStreamHandleImpl* impl =
20 static_cast<WebSocketStreamHandleImpl*>(handle);
21 impl->SetUserData(handle, new SocketStreamHandleData(render_view_id));
22 }
23
24 // static
25 const SocketStreamHandleData* SocketStreamHandleData::ForHandle(
26 WebSocketStreamHandle* handle) {
27 if (!handle)
28 return NULL;
29 WebSocketStreamHandleImpl* impl =
30 static_cast<WebSocketStreamHandleImpl*>(handle);
31 return static_cast<SocketStreamHandleData*>(impl->GetUserData(handle));
32 }
OLDNEW
« no previous file with comments | « content/common/socket_stream_handle_data.h ('k') | content/common/socket_stream_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698