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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "content/browser/renderer_host/input/input_router_impl.h" 42 #include "content/browser/renderer_host/input/input_router_impl.h"
43 #include "content/browser/renderer_host/input/timeout_monitor.h" 43 #include "content/browser/renderer_host/input/timeout_monitor.h"
44 #include "content/browser/renderer_host/render_process_host_impl.h" 44 #include "content/browser/renderer_host/render_process_host_impl.h"
45 #include "content/browser/renderer_host/render_view_host_delegate.h" 45 #include "content/browser/renderer_host/render_view_host_delegate.h"
46 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 46 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
47 #include "content/browser/renderer_host/render_view_host_impl.h" 47 #include "content/browser/renderer_host/render_view_host_impl.h"
48 #include "content/browser/renderer_host/render_widget_host_delegate.h" 48 #include "content/browser/renderer_host/render_widget_host_delegate.h"
49 #include "content/browser/renderer_host/render_widget_host_impl.h" 49 #include "content/browser/renderer_host/render_widget_host_impl.h"
50 #include "content/browser/renderer_host/render_widget_host_view_base.h" 50 #include "content/browser/renderer_host/render_widget_host_view_base.h"
51 #include "content/browser/wake_lock/wake_lock_service_context.h" 51 #include "content/browser/wake_lock/wake_lock_service_context.h"
52 #include "content/browser/websockets/websocket_manager.h"
52 #include "content/browser/webui/web_ui_controller_factory_registry.h" 53 #include "content/browser/webui/web_ui_controller_factory_registry.h"
53 #include "content/common/accessibility_messages.h" 54 #include "content/common/accessibility_messages.h"
54 #include "content/common/frame_messages.h" 55 #include "content/common/frame_messages.h"
55 #include "content/common/frame_owner_properties.h" 56 #include "content/common/frame_owner_properties.h"
56 #include "content/common/input_messages.h" 57 #include "content/common/input_messages.h"
57 #include "content/common/inter_process_time_ticks_converter.h" 58 #include "content/common/inter_process_time_ticks_converter.h"
58 #include "content/common/navigation_params.h" 59 #include "content/common/navigation_params.h"
59 #include "content/common/site_isolation_policy.h" 60 #include "content/common/site_isolation_policy.h"
60 #include "content/common/swapped_out_messages.h" 61 #include "content/common/swapped_out_messages.h"
61 #include "content/public/browser/ax_event_notification_details.h" 62 #include "content/public/browser/ax_event_notification_details.h"
(...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after
2116 #endif 2117 #endif
2117 2118
2118 if (enable_web_bluetooth) { 2119 if (enable_web_bluetooth) {
2119 GetInterfaceRegistry()->AddInterface(base::Bind( 2120 GetInterfaceRegistry()->AddInterface(base::Bind(
2120 base::IgnoreResult(&RenderFrameHostImpl::CreateWebBluetoothService), 2121 base::IgnoreResult(&RenderFrameHostImpl::CreateWebBluetoothService),
2121 base::Unretained(this))); 2122 base::Unretained(this)));
2122 } 2123 }
2123 2124
2124 GetInterfaceRegistry()->AddInterface<media::mojom::ServiceFactory>(this); 2125 GetInterfaceRegistry()->AddInterface<media::mojom::ServiceFactory>(this);
2125 2126
2127 // This is to support usage of WebSockets in cases in which there is an
2128 // associated RenderFrame. This is important for showing the correct security
2129 // state of the page and also honoring user override of bad certificates.
2130 GetInterfaceRegistry()->AddInterface(
2131 base::Bind(&WebSocketManager::CreateWebSocket,
2132 process_->GetID(),
2133 routing_id_));
2134
2126 #if defined(ENABLE_WEBVR) 2135 #if defined(ENABLE_WEBVR)
2127 const base::CommandLine& browser_command_line = 2136 const base::CommandLine& browser_command_line =
2128 *base::CommandLine::ForCurrentProcess(); 2137 *base::CommandLine::ForCurrentProcess();
2129 2138
2130 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { 2139 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) {
2131 GetInterfaceRegistry()->AddInterface<device::VRService>( 2140 GetInterfaceRegistry()->AddInterface<device::VRService>(
2132 base::Bind(&device::VRServiceImpl::BindRequest)); 2141 base::Bind(&device::VRServiceImpl::BindRequest));
2133 } 2142 }
2134 #endif 2143 #endif
2135 2144
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
3036 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3045 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3037 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3046 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3038 return web_bluetooth_service_.get(); 3047 return web_bluetooth_service_.get();
3039 } 3048 }
3040 3049
3041 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3050 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3042 web_bluetooth_service_.reset(); 3051 web_bluetooth_service_.reset();
3043 } 3052 }
3044 3053
3045 } // namespace content 3054 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698