| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "content/browser/renderer_host/input/input_router_impl.h" | 44 #include "content/browser/renderer_host/input/input_router_impl.h" |
| 45 #include "content/browser/renderer_host/input/timeout_monitor.h" | 45 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| 46 #include "content/browser/renderer_host/render_process_host_impl.h" | 46 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 47 #include "content/browser/renderer_host/render_view_host_delegate.h" | 47 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 48 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 48 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
| 49 #include "content/browser/renderer_host/render_view_host_impl.h" | 49 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 50 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 50 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 51 #include "content/browser/renderer_host/render_widget_host_impl.h" | 51 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 52 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 52 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 53 #include "content/browser/wake_lock/wake_lock_service_context.h" | 53 #include "content/browser/wake_lock/wake_lock_service_context.h" |
| 54 #include "content/browser/websockets/websocket_manager.h" |
| 54 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 55 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 55 #include "content/common/accessibility_messages.h" | 56 #include "content/common/accessibility_messages.h" |
| 56 #include "content/common/frame_messages.h" | 57 #include "content/common/frame_messages.h" |
| 57 #include "content/common/input_messages.h" | 58 #include "content/common/input_messages.h" |
| 58 #include "content/common/inter_process_time_ticks_converter.h" | 59 #include "content/common/inter_process_time_ticks_converter.h" |
| 59 #include "content/common/navigation_params.h" | 60 #include "content/common/navigation_params.h" |
| 60 #include "content/common/site_isolation_policy.h" | 61 #include "content/common/site_isolation_policy.h" |
| 61 #include "content/common/swapped_out_messages.h" | 62 #include "content/common/swapped_out_messages.h" |
| 63 #include "content/common/websocket.mojom.h" |
| 62 #include "content/public/browser/ax_event_notification_details.h" | 64 #include "content/public/browser/ax_event_notification_details.h" |
| 63 #include "content/public/browser/browser_accessibility_state.h" | 65 #include "content/public/browser/browser_accessibility_state.h" |
| 64 #include "content/public/browser/browser_context.h" | 66 #include "content/public/browser/browser_context.h" |
| 65 #include "content/public/browser/browser_plugin_guest_manager.h" | 67 #include "content/public/browser/browser_plugin_guest_manager.h" |
| 66 #include "content/public/browser/browser_thread.h" | 68 #include "content/public/browser/browser_thread.h" |
| 67 #include "content/public/browser/content_browser_client.h" | 69 #include "content/public/browser/content_browser_client.h" |
| 68 #include "content/public/browser/permission_manager.h" | 70 #include "content/public/browser/permission_manager.h" |
| 69 #include "content/public/browser/permission_type.h" | 71 #include "content/public/browser/permission_type.h" |
| 70 #include "content/public/browser/render_process_host.h" | 72 #include "content/public/browser/render_process_host.h" |
| 71 #include "content/public/browser/render_widget_host_view.h" | 73 #include "content/public/browser/render_widget_host_view.h" |
| (...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 base::Unretained(permission_service_context_.get()))); | 2040 base::Unretained(permission_service_context_.get()))); |
| 2039 | 2041 |
| 2040 GetInterfaceRegistry()->AddInterface(base::Bind( | 2042 GetInterfaceRegistry()->AddInterface(base::Bind( |
| 2041 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); | 2043 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); |
| 2042 | 2044 |
| 2043 #if !defined(OS_ANDROID) | 2045 #if !defined(OS_ANDROID) |
| 2044 GetInterfaceRegistry()->AddInterface( | 2046 GetInterfaceRegistry()->AddInterface( |
| 2045 base::Bind(&device::VibrationManagerImpl::Create)); | 2047 base::Bind(&device::VibrationManagerImpl::Create)); |
| 2046 #endif | 2048 #endif |
| 2047 | 2049 |
| 2050 GetInterfaceRegistry()->AddInterface( |
| 2051 base::Bind( |
| 2052 &WebSocketManager::CreateWebSocket, |
| 2053 base::Unretained(static_cast<RenderProcessHostImpl*>(process_)-> |
| 2054 GetWebSocketManager()), |
| 2055 routing_id_), |
| 2056 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 2057 |
| 2048 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( | 2058 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 2049 switches::kEnableWebBluetooth); | 2059 switches::kEnableWebBluetooth); |
| 2050 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 2060 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
| 2051 enable_web_bluetooth = true; | 2061 enable_web_bluetooth = true; |
| 2052 #endif | 2062 #endif |
| 2053 | 2063 |
| 2054 if (enable_web_bluetooth) { | 2064 if (enable_web_bluetooth) { |
| 2055 GetInterfaceRegistry()->AddInterface( | 2065 GetInterfaceRegistry()->AddInterface( |
| 2056 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, | 2066 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, |
| 2057 base::Unretained(this))); | 2067 base::Unretained(this))); |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2958 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2968 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
| 2959 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2969 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 2960 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2970 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 2961 } | 2971 } |
| 2962 | 2972 |
| 2963 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2973 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 2964 web_bluetooth_service_.reset(); | 2974 web_bluetooth_service_.reset(); |
| 2965 } | 2975 } |
| 2966 | 2976 |
| 2967 } // namespace content | 2977 } // namespace content |
| OLD | NEW |