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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/socket_stream_handle_data.h ('k') | content/content_child.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/socket_stream_handle_data.cc
diff --git a/content/common/socket_stream_handle_data.cc b/content/common/socket_stream_handle_data.cc
new file mode 100644
index 0000000000000000000000000000000000000000..04f66ef67935f03b1440be9289f34f84a5adc85a
--- /dev/null
+++ b/content/common/socket_stream_handle_data.cc
@@ -0,0 +1,36 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/common/socket_stream_handle_data.h"
+
+#include "webkit/child/websocketstreamhandle_impl.h"
+
+using webkit_glue::WebSocketStreamHandleImpl;
+using blink::WebSocketStreamHandle;
+
+namespace content {
+
+// static
+void SocketStreamHandleData::AddToHandle(
+ WebSocketStreamHandle* handle, int render_frame_id) {
+ if (!handle) {
+ NOTREACHED();
+ return;
+ }
+ WebSocketStreamHandleImpl* impl =
+ static_cast<WebSocketStreamHandleImpl*>(handle);
+ impl->SetUserData(handle, new SocketStreamHandleData(render_frame_id));
+}
+
+// static
+const SocketStreamHandleData* SocketStreamHandleData::ForHandle(
+ WebSocketStreamHandle* handle) {
+ if (!handle)
+ return NULL;
+ WebSocketStreamHandleImpl* impl =
+ static_cast<WebSocketStreamHandleImpl*>(handle);
+ return static_cast<SocketStreamHandleData*>(impl->GetUserData(handle));
+}
+
+} // namespace content
« 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