Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index 394217d4134b10168d9f0ec6c6bf484396c677c1..96acc2777ac1618dc943695e48727f5219dd5d2c 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -111,7 +111,6 @@ |
#include "content/browser/renderer_host/render_widget_helper.h" |
#include "content/browser/renderer_host/render_widget_host_impl.h" |
#include "content/browser/renderer_host/text_input_client_message_filter.h" |
-#include "content/browser/renderer_host/websocket_dispatcher_host.h" |
#include "content/browser/resolve_proxy_msg_helper.h" |
#include "content/browser/service_worker/service_worker_context_wrapper.h" |
#include "content/browser/service_worker/service_worker_dispatcher_host.h" |
@@ -121,6 +120,7 @@ |
#include "content/browser/storage_partition_impl.h" |
#include "content/browser/streams/stream_context.h" |
#include "content/browser/tracing/trace_message_filter.h" |
+#include "content/browser/websockets/websocket_manager.h" |
#include "content/browser/webui/web_ui_controller_factory_registry.h" |
#include "content/common/child_process_host_impl.h" |
#include "content/common/child_process_messages.h" |
@@ -1035,15 +1035,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
AddFilter(new BrowserCdmManager(GetID(), NULL)); |
#endif |
- WebSocketDispatcherHost::GetRequestContextCallback |
- websocket_request_context_callback( |
- base::Bind(&GetRequestContext, request_context, media_request_context, |
- RESOURCE_TYPE_SUB_RESOURCE)); |
- |
- AddFilter(new WebSocketDispatcherHost( |
- GetID(), websocket_request_context_callback, blob_storage_context.get(), |
- storage_partition_impl_)); |
- |
message_port_message_filter_ = new MessagePortMessageFilter( |
base::Bind(&RenderWidgetHelper::GetNextRoutingID, |
base::Unretained(widget_helper_.get()))); |
@@ -1170,6 +1161,12 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { |
registry->AddInterface(base::Bind(&DeviceOrientationHost::Create)); |
registry->AddInterface(base::Bind(&DeviceOrientationAbsoluteHost::Create)); |
+ // This is to support usage of WebSockets in cases in which there is no |
+ // associated RenderFrame (e.g., Shared Workers). |
+ registry->AddInterface( |
+ base::Bind(&WebSocketManager::CreateWebSocket, GetID(), MSG_ROUTING_NONE), |
+ ui_task_runner); |
+ |
GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), |
this); |