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

Unified Diff: Source/modules/websockets/MainThreadWebSocketChannel.cpp

Issue 304113002: Pass render frame ID to WebSocketBridge (Blink side) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed #2 Created 6 years, 7 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
Index: Source/modules/websockets/MainThreadWebSocketChannel.cpp
diff --git a/Source/modules/websockets/MainThreadWebSocketChannel.cpp b/Source/modules/websockets/MainThreadWebSocketChannel.cpp
index a8b2a825ebdba010478ffdd03b7ee9167d032a11..5867f28ba226e620b9617d5cedd043983be501d2 100644
--- a/Source/modules/websockets/MainThreadWebSocketChannel.cpp
+++ b/Source/modules/websockets/MainThreadWebSocketChannel.cpp
@@ -113,7 +113,14 @@ bool MainThreadWebSocketChannel::connect(const KURL& url, const String& protocol
InspectorInstrumentation::didCreateWebSocket(m_document, m_identifier, url, protocol);
}
ref();
- m_handle = SocketStreamHandle::create(m_handshake->url(), this);
+
+ m_handle = SocketStreamHandle::create(this);
+ ASSERT(m_handle);
+ if (m_document->frame()) {
+ m_document->frame()->loader().client()->dispatchWillOpenSocketStream(m_handle.get());
+ }
+ m_handle->connect(m_handshake->url());
+
return true;
}
@@ -270,14 +277,6 @@ void MainThreadWebSocketChannel::resume()
m_resumeTimer.startOneShot(0, FROM_HERE);
}
-void MainThreadWebSocketChannel::willOpenSocketStream(SocketStreamHandle* handle)
-{
- WTF_LOG(Network, "MainThreadWebSocketChannel %p willOpenSocketStream()", this);
- ASSERT(handle);
- if (m_document->frame())
- m_document->frame()->loader().client()->dispatchWillOpenSocketStream(handle);
-}
-
void MainThreadWebSocketChannel::didOpenSocketStream(SocketStreamHandle* handle)
{
WTF_LOG(Network, "MainThreadWebSocketChannel %p didOpenSocketStream()", this);
« no previous file with comments | « Source/modules/websockets/MainThreadWebSocketChannel.h ('k') | Source/modules/websockets/NewWebSocketChannelImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698