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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2119973002: Port WebSockets to Mojo IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error Created 4 years, 4 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: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 3bd70a50bfe0ab6348b9b28c0a7b29ef4caf0225..a3b9415cbc3e250f5dcf67b2ac2dc076b7fe944c 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -45,7 +45,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"
@@ -135,6 +134,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"
@@ -4311,11 +4311,6 @@ void RenderFrameImpl::requestStorageQuota(
QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
}
-void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) {
- WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle);
- impl->set_render_frame_id(routing_id_);
-}
-
blink::WebPresentationClient* RenderFrameImpl::presentationClient() {
if (!presentation_dispatcher_)
presentation_dispatcher_ = new PresentationDispatcher(this);
@@ -4328,6 +4323,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)

Powered by Google App Engine
This is Rietveld 408576698