Remove implementations of WebMediaPlayer::supportsFullscreen()
[chromium-blink-merge.git] / content / common / socket_stream_handle_data.cc
blob0bf3f5795b4a7f8543fbb9ebfaee4a33981f0ced
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.
5 #include "content/common/socket_stream_handle_data.h"
7 #include "webkit/child/websocketstreamhandle_impl.h"
9 using webkit_glue::WebSocketStreamHandleImpl;
10 using blink::WebSocketStreamHandle;
12 namespace content {
14 // static
15 void SocketStreamHandleData::AddToHandle(
16 WebSocketStreamHandle* handle, int render_frame_id) {
17 if (!handle) {
18 NOTREACHED();
19 return;
21 WebSocketStreamHandleImpl* impl =
22 static_cast<WebSocketStreamHandleImpl*>(handle);
23 impl->SetUserData(handle, new SocketStreamHandleData(render_frame_id));
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));
36 } // namespace content