Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index c68e0df855e2d299d5d40c94694cd2afa095d36e..95165ffa90454bbfe6eec5fffa8ab0de4559597b 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -132,6 +132,7 @@ |
#include "content/renderer/web_frame_utils.h" |
#include "content/renderer/web_ui_extension.h" |
#include "content/renderer/websharedworker_proxy.h" |
+#include "content/renderer/websockethandle_impl.h" |
#include "crypto/sha2.h" |
#include "gin/modules/module_registry.h" |
#include "media/audio/audio_output_device.h" |
@@ -4306,6 +4307,15 @@ blink::WebPushClient* RenderFrameImpl::pushClient() { |
return push_messaging_dispatcher_; |
} |
+void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { |
+ // Initialize the WebSocketHandle with our InterfaceProvider to provide the |
+ // WebSocket implementation with context about this frame. This is important |
+ // so that the browser can show UI associated with the WebSocket (e.g., for |
+ // certificate errors). |
+ static_cast<WebSocketHandleImpl*>(handle)->Initialize( |
+ blink_interface_provider_.get()); |
+} |
+ |
void RenderFrameImpl::willStartUsingPeerConnectionHandler( |
blink::WebRTCPeerConnectionHandler* handler) { |
#if defined(ENABLE_WEBRTC) |