| 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" |
| 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 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2102 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 2103 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
| 2103 enable_web_bluetooth = true; | 2104 enable_web_bluetooth = true; |
| 2104 #endif | 2105 #endif |
| 2105 | 2106 |
| 2106 if (enable_web_bluetooth) { | 2107 if (enable_web_bluetooth) { |
| 2107 GetInterfaceRegistry()->AddInterface(base::Bind( | 2108 GetInterfaceRegistry()->AddInterface(base::Bind( |
| 2108 base::IgnoreResult(&RenderFrameHostImpl::CreateWebBluetoothService), | 2109 base::IgnoreResult(&RenderFrameHostImpl::CreateWebBluetoothService), |
| 2109 base::Unretained(this))); | 2110 base::Unretained(this))); |
| 2110 } | 2111 } |
| 2111 | 2112 |
| 2113 GetInterfaceRegistry()->AddInterface( |
| 2114 base::Bind(&WebSocketManager::CreateWebSocket, |
| 2115 process_->GetID(), |
| 2116 routing_id_)); |
| 2117 |
| 2112 #if defined(MOJO_SHELL_CLIENT) | 2118 #if defined(MOJO_SHELL_CLIENT) |
| 2113 // media::mojom::ServiceFactory is generated in GN builds only. | 2119 // media::mojom::ServiceFactory is generated in GN builds only. |
| 2114 GetInterfaceRegistry()->AddInterface<media::mojom::ServiceFactory>( | 2120 GetInterfaceRegistry()->AddInterface<media::mojom::ServiceFactory>( |
| 2115 base::Bind(&CreateMediaServiceFactory, | 2121 base::Bind(&CreateMediaServiceFactory, |
| 2116 GetProcess()->GetBrowserContext(), this)); | 2122 GetProcess()->GetBrowserContext(), this)); |
| 2117 #endif // defined(MOJO_SHELL_CLIENT) | 2123 #endif // defined(MOJO_SHELL_CLIENT) |
| 2118 | 2124 |
| 2119 #if defined(ENABLE_WEBVR) | 2125 #if defined(ENABLE_WEBVR) |
| 2120 const base::CommandLine& browser_command_line = | 2126 const base::CommandLine& browser_command_line = |
| 2121 *base::CommandLine::ForCurrentProcess(); | 2127 *base::CommandLine::ForCurrentProcess(); |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3029 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3035 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3030 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3036 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3031 return web_bluetooth_service_.get(); | 3037 return web_bluetooth_service_.get(); |
| 3032 } | 3038 } |
| 3033 | 3039 |
| 3034 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3040 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3035 web_bluetooth_service_.reset(); | 3041 web_bluetooth_service_.reset(); |
| 3036 } | 3042 } |
| 3037 | 3043 |
| 3038 } // namespace content | 3044 } // namespace content |
| OLD | NEW |