Chromium Code Reviews| Index: content/renderer/render_frame_impl.cc |
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
| index db7242bce67a9b0995cde3fe8a29c56a4d2fa453..fb2b456ff0810a4320fd7e8a620a88b55ce249f1 100644 |
| --- a/content/renderer/render_frame_impl.cc |
| +++ b/content/renderer/render_frame_impl.cc |
| @@ -46,7 +46,6 @@ |
| #include "content/child/web_url_loader_impl.h" |
| #include "content/child/web_url_request_util.h" |
| #include "content/child/webmessageportchannel_impl.h" |
| -#include "content/child/websocket_bridge.h" |
| #include "content/child/weburlresponse_extradata_impl.h" |
| #include "content/common/accessibility_messages.h" |
| #include "content/common/clipboard_messages.h" |
| @@ -136,6 +135,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" |
| @@ -4287,8 +4287,12 @@ void RenderFrameImpl::requestStorageQuota( |
| } |
| void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { |
| - WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle); |
| - impl->set_render_frame_id(routing_id_); |
| + // Here, we override the InterfaceProvider to that of the RenderFrame so that |
| + // the WebSocket instance will have context about what RenderFrame it is |
| + // associated with. This enables any security UI to be shown relative to the |
|
Adam Rice
2016/07/08 04:03:11
Extreme nitpick: We have a policy of never showing
|
| + // corresponding browser tab. |
| + static_cast<WebSocketHandleImpl*>(handle)->SetInterfaceProvider( |
| + GetRemoteInterfaces()->GetWeakPtr()); |
| } |
| blink::WebPresentationClient* RenderFrameImpl::presentationClient() { |