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

Unified Diff: Source/modules/websockets/NewWebSocketChannelImpl.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/NewWebSocketChannelImpl.cpp
diff --git a/Source/modules/websockets/NewWebSocketChannelImpl.cpp b/Source/modules/websockets/NewWebSocketChannelImpl.cpp
index 2de1ed7f3d9ca6bae0c9d9fc5f8ad192b3ff55e5..7b056012a46a1b31e2b628f282b8c0e9336ebfc1 100644
--- a/Source/modules/websockets/NewWebSocketChannelImpl.cpp
+++ b/Source/modules/websockets/NewWebSocketChannelImpl.cpp
@@ -39,6 +39,7 @@
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/InspectorTraceEvents.h"
#include "core/loader/FrameLoader.h"
+#include "core/loader/FrameLoaderClient.h"
#include "core/loader/MixedContentChecker.h"
#include "core/loader/UniqueIdentifier.h"
#include "modules/websockets/WebSocketChannelClient.h"
@@ -154,7 +155,11 @@ bool NewWebSocketChannelImpl::connect(const KURL& url, const String& protocol)
for (size_t i = 0; i < protocols.size(); ++i) {
webProtocols[i] = protocols[i];
}
+
+ if (executionContext()->isDocument() && document()->frame())
+ document()->frame()->loader().client()->dispatchWillOpenWebSocket(m_handle.get());
m_handle->connect(url, webProtocols, *executionContext()->securityOrigin(), this);
+
flowControlIfNecessary();
if (m_identifier) {
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "WebSocketCreate", "data", InspectorWebSocketCreateEvent::data(document(), m_identifier, url, protocol));
« no previous file with comments | « Source/modules/websockets/MainThreadWebSocketChannel.cpp ('k') | Source/platform/network/SocketStreamHandle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698