Chromium Code Reviews| Index: content/common/socket_stream_dispatcher.cc |
| diff --git a/content/common/socket_stream_dispatcher.cc b/content/common/socket_stream_dispatcher.cc |
| index 640a15b83dba608df5bc434012bfbf45a72cb1a6..7d6dbf37c24c2ae6b72ad3a3a0448fd7e4823121 100644 |
| --- a/content/common/socket_stream_dispatcher.cc |
| +++ b/content/common/socket_stream_dispatcher.cc |
| @@ -14,9 +14,11 @@ |
| #include "content/common/child_thread.h" |
| #include "content/common/socket_stream.h" |
| #include "content/common/socket_stream_messages.h" |
| +#include "content/renderer/websocketstreamhandle_impl_extradata_impl.h" |
| #include "googleurl/src/gurl.h" |
| #include "webkit/glue/websocketstreamhandle_bridge.h" |
| #include "webkit/glue/websocketstreamhandle_delegate.h" |
| +#include "webkit/glue/websocketstreamhandle_impl.h" |
| // IPCWebSocketStreamHandleBridge is owned by each SocketStreamHandle. |
| // It communicates with the main browser process via SocketStreamDispatcher. |
| @@ -146,8 +148,19 @@ void IPCWebSocketStreamHandleBridge::DoConnect(const GURL& url) { |
| socket_id_ = all_bridges.Get().Add(this); |
| DCHECK_NE(socket_id_, content::kNoSocketId); |
| + int render_view_id = MSG_ROUTING_NONE; |
| + webkit_glue::WebSocketStreamHandleImpl* handle = |
|
darin (slow to review)
2012/03/19 20:58:28
you might consider hiding some of this goop behind
Takashi Toyoshima
2012/03/19 22:58:44
Is doing static cast in SocketHandleData::ForHandl
|
| + static_cast<webkit_glue::WebSocketStreamHandleImpl*>(handle_); |
| + if (handle) { |
| + const WebSocketStreamHandleImplExtraDataImpl* data = |
| + static_cast<const WebSocketStreamHandleImplExtraDataImpl*>( |
| + handle->extraData()); |
| + if (data) |
| + render_view_id = data->render_view_id(); |
| + } |
| AddRef(); // Released in OnClosed(). |
| - if (child_thread_->Send(new SocketStreamHostMsg_Connect(url, socket_id_))) { |
| + if (child_thread_->Send( |
| + new SocketStreamHostMsg_Connect(render_view_id, url, socket_id_))) { |
| DVLOG(1) << "Connect socket_id=" << socket_id_; |
| // TODO(ukai): timeout to OnConnected. |
| } else { |