| OLD | NEW |
| 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 Loading... |
| 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" | |
| 53 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 52 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 54 #include "content/common/accessibility_messages.h" | 53 #include "content/common/accessibility_messages.h" |
| 55 #include "content/common/frame_messages.h" | 54 #include "content/common/frame_messages.h" |
| 56 #include "content/common/frame_owner_properties.h" | 55 #include "content/common/frame_owner_properties.h" |
| 57 #include "content/common/input_messages.h" | 56 #include "content/common/input_messages.h" |
| 58 #include "content/common/inter_process_time_ticks_converter.h" | 57 #include "content/common/inter_process_time_ticks_converter.h" |
| 59 #include "content/common/navigation_params.h" | 58 #include "content/common/navigation_params.h" |
| 60 #include "content/common/site_isolation_policy.h" | 59 #include "content/common/site_isolation_policy.h" |
| 61 #include "content/common/swapped_out_messages.h" | 60 #include "content/common/swapped_out_messages.h" |
| 62 #include "content/public/browser/ax_event_notification_details.h" | 61 #include "content/public/browser/ax_event_notification_details.h" |
| (...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2117 #endif | 2116 #endif |
| 2118 | 2117 |
| 2119 if (enable_web_bluetooth) { | 2118 if (enable_web_bluetooth) { |
| 2120 GetInterfaceRegistry()->AddInterface(base::Bind( | 2119 GetInterfaceRegistry()->AddInterface(base::Bind( |
| 2121 base::IgnoreResult(&RenderFrameHostImpl::CreateWebBluetoothService), | 2120 base::IgnoreResult(&RenderFrameHostImpl::CreateWebBluetoothService), |
| 2122 base::Unretained(this))); | 2121 base::Unretained(this))); |
| 2123 } | 2122 } |
| 2124 | 2123 |
| 2125 GetInterfaceRegistry()->AddInterface<media::mojom::ServiceFactory>(this); | 2124 GetInterfaceRegistry()->AddInterface<media::mojom::ServiceFactory>(this); |
| 2126 | 2125 |
| 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 | |
| 2135 #if defined(ENABLE_WEBVR) | 2126 #if defined(ENABLE_WEBVR) |
| 2136 const base::CommandLine& browser_command_line = | 2127 const base::CommandLine& browser_command_line = |
| 2137 *base::CommandLine::ForCurrentProcess(); | 2128 *base::CommandLine::ForCurrentProcess(); |
| 2138 | 2129 |
| 2139 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 2130 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
| 2140 GetInterfaceRegistry()->AddInterface<device::VRService>( | 2131 GetInterfaceRegistry()->AddInterface<device::VRService>( |
| 2141 base::Bind(&device::VRServiceImpl::BindRequest)); | 2132 base::Bind(&device::VRServiceImpl::BindRequest)); |
| 2142 } | 2133 } |
| 2143 #endif | 2134 #endif |
| 2144 | 2135 |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3045 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3036 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3046 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3037 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3047 return web_bluetooth_service_.get(); | 3038 return web_bluetooth_service_.get(); |
| 3048 } | 3039 } |
| 3049 | 3040 |
| 3050 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3041 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3051 web_bluetooth_service_.reset(); | 3042 web_bluetooth_service_.reset(); |
| 3052 } | 3043 } |
| 3053 | 3044 |
| 3054 } // namespace content | 3045 } // namespace content |
| OLD | NEW |