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

Unified Diff: content/browser/frame_host/render_frame_host_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/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 1a55641cb0cbc7d1dfeb60d0cfd413f12035677b..ec402d5f1e27adf7dae049e9632c55869854705a 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -49,6 +49,7 @@
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/browser/wake_lock/wake_lock_service_context.h"
+#include "content/browser/websockets/websocket_manager.h"
#include "content/browser/webui/web_ui_controller_factory_registry.h"
#include "content/common/accessibility_messages.h"
#include "content/common/frame_messages.h"
@@ -2123,6 +2124,14 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
GetInterfaceRegistry()->AddInterface<media::mojom::ServiceFactory>(this);
+ // This is to support usage of WebSockets in cases in which there is an
+ // associated RenderFrame. This is important for showing the correct security
+ // state of the page and also honoring user override of bad certificates.
+ GetInterfaceRegistry()->AddInterface(
+ base::Bind(&WebSocketManager::CreateWebSocket,
+ process_->GetID(),
+ routing_id_));
+
#if defined(ENABLE_WEBVR)
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();

Powered by Google App Engine
This is Rietveld 408576698