diff options
Diffstat (limited to 'content/common')
-rw-r--r-- | content/common/DEPS | 3 | ||||
-rw-r--r-- | content/common/socket_stream_handle_data.cc | 36 | ||||
-rw-r--r-- | content/common/socket_stream_handle_data.h | 22 |
3 files changed, 3 insertions, 58 deletions
diff --git a/content/common/DEPS b/content/common/DEPS index b26b7a4..9e5bef7 100644 --- a/content/common/DEPS +++ b/content/common/DEPS @@ -5,9 +5,6 @@ include_rules = [ "-webkit/child", "-webkit/renderer", - # TODO(ananta|jamesr|scottmg) http://crbug.com/237249 - "!webkit/child/websocketstreamhandle_impl.h", - # No inclusion of WebKit from the browser, other than strictly enum/POD, # header-only types, and some selected common code. "-third_party/WebKit", diff --git a/content/common/socket_stream_handle_data.cc b/content/common/socket_stream_handle_data.cc deleted file mode 100644 index 04f66ef..0000000 --- a/content/common/socket_stream_handle_data.cc +++ /dev/null @@ -1,36 +0,0 @@ -// 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 diff --git a/content/common/socket_stream_handle_data.h b/content/common/socket_stream_handle_data.h index 113f889..3ce79ca 100644 --- a/content/common/socket_stream_handle_data.h +++ b/content/common/socket_stream_handle_data.h @@ -6,36 +6,20 @@ #define CONTENT_RENDERER_SOCKET_STREAM_HANDLE_DATA_H_ #include "base/supports_user_data.h" -#include "content_export.h" - -namespace blink { -class WebSocketStreamHandle; -} +#include "content/common/content_export.h" namespace content { // User data stored in each WebSocketStreamHandleImpl. class SocketStreamHandleData : public base::SupportsUserData::Data { public: + explicit SocketStreamHandleData(int render_frame_id) + : render_frame_id_(render_frame_id) {} virtual ~SocketStreamHandleData() {} int render_frame_id() const { return render_frame_id_; } - // Creates SocketStreamHandleData object with |render_frame_id| and store it - // to |handle|. - static void AddToHandle( - blink::WebSocketStreamHandle* handle, int render_frame_id); - - // Retrieves the stored user data from blink::WebSocketStreamHandle object. - // |handle| must actually be a WebSocketStreamHandleImpl object. - CONTENT_EXPORT static const SocketStreamHandleData* ForHandle( - blink::WebSocketStreamHandle* handle); - private: - explicit SocketStreamHandleData(int render_frame_id) - : render_frame_id_(render_frame_id) { - } - int render_frame_id_; DISALLOW_COPY_AND_ASSIGN(SocketStreamHandleData); |