| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 #include "content/public/common/file_chooser_file_info.h" | 90 #include "content/public/common/file_chooser_file_info.h" |
| 91 #include "content/public/common/file_chooser_params.h" | 91 #include "content/public/common/file_chooser_params.h" |
| 92 #include "content/public/common/isolated_world_ids.h" | 92 #include "content/public/common/isolated_world_ids.h" |
| 93 #include "content/public/common/service_manager_connection.h" | 93 #include "content/public/common/service_manager_connection.h" |
| 94 #include "content/public/common/service_names.mojom.h" | 94 #include "content/public/common/service_names.mojom.h" |
| 95 #include "content/public/common/url_constants.h" | 95 #include "content/public/common/url_constants.h" |
| 96 #include "content/public/common/url_utils.h" | 96 #include "content/public/common/url_utils.h" |
| 97 #include "device/generic_sensor/sensor_provider_impl.h" | 97 #include "device/generic_sensor/sensor_provider_impl.h" |
| 98 #include "device/geolocation/geolocation_service_context.h" | 98 #include "device/geolocation/geolocation_service_context.h" |
| 99 #include "device/vibration/vibration_manager_impl.h" | 99 #include "device/vibration/vibration_manager_impl.h" |
| 100 #include "device/vr/features.h" |
| 100 #include "device/wake_lock/wake_lock_service_context.h" | 101 #include "device/wake_lock/wake_lock_service_context.h" |
| 101 #include "media/base/media_switches.h" | 102 #include "media/base/media_switches.h" |
| 102 #include "media/media_features.h" | 103 #include "media/media_features.h" |
| 103 #include "media/mojo/interfaces/media_service.mojom.h" | 104 #include "media/mojo/interfaces/media_service.mojom.h" |
| 104 #include "media/mojo/interfaces/remoting.mojom.h" | 105 #include "media/mojo/interfaces/remoting.mojom.h" |
| 105 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" | 106 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
| 106 #include "mojo/public/cpp/bindings/strong_binding.h" | 107 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 107 #include "services/service_manager/public/cpp/connector.h" | 108 #include "services/service_manager/public/cpp/connector.h" |
| 108 #include "services/service_manager/public/cpp/interface_provider.h" | 109 #include "services/service_manager/public/cpp/interface_provider.h" |
| 109 #include "ui/accessibility/ax_tree.h" | 110 #include "ui/accessibility/ax_tree.h" |
| 110 #include "ui/accessibility/ax_tree_id_registry.h" | 111 #include "ui/accessibility/ax_tree_id_registry.h" |
| 111 #include "ui/accessibility/ax_tree_update.h" | 112 #include "ui/accessibility/ax_tree_update.h" |
| 112 #include "ui/gfx/geometry/quad_f.h" | 113 #include "ui/gfx/geometry/quad_f.h" |
| 113 #include "url/gurl.h" | 114 #include "url/gurl.h" |
| 114 | 115 |
| 115 #if defined(OS_ANDROID) | 116 #if defined(OS_ANDROID) |
| 116 #include "content/browser/frame_host/render_frame_host_android.h" | 117 #include "content/browser/frame_host/render_frame_host_android.h" |
| 117 #include "content/browser/media/android/media_player_renderer.h" | 118 #include "content/browser/media/android/media_player_renderer.h" |
| 118 #include "content/public/browser/android/java_interfaces.h" | 119 #include "content/public/browser/android/java_interfaces.h" |
| 119 #include "media/base/audio_renderer_sink.h" | 120 #include "media/base/audio_renderer_sink.h" |
| 120 #include "media/base/video_renderer_sink.h" | 121 #include "media/base/video_renderer_sink.h" |
| 121 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck | 122 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck |
| 122 #endif | 123 #endif |
| 123 | 124 |
| 124 #if defined(OS_MACOSX) | 125 #if defined(OS_MACOSX) |
| 125 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 126 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
| 126 #endif | 127 #endif |
| 127 | 128 |
| 128 #if defined(ENABLE_WEBVR) | 129 #if BUILDFLAG(ENABLE_WEBVR) |
| 129 #include "device/vr/vr_service_impl.h" // nogncheck | 130 #include "device/vr/vr_service_impl.h" // nogncheck |
| 130 #else | 131 #else |
| 131 #include "device/vr/vr_service.mojom.h" // nogncheck | 132 #include "device/vr/vr_service.mojom.h" // nogncheck |
| 132 #endif | 133 #endif |
| 133 | 134 |
| 134 using base::TimeDelta; | 135 using base::TimeDelta; |
| 135 | 136 |
| 136 namespace content { | 137 namespace content { |
| 137 | 138 |
| 138 namespace { | 139 namespace { |
| (...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2360 GetInterfaceRegistry()->AddInterface<media::mojom::InterfaceFactory>(this); | 2361 GetInterfaceRegistry()->AddInterface<media::mojom::InterfaceFactory>(this); |
| 2361 | 2362 |
| 2362 // This is to support usage of WebSockets in cases in which there is an | 2363 // This is to support usage of WebSockets in cases in which there is an |
| 2363 // associated RenderFrame. This is important for showing the correct security | 2364 // associated RenderFrame. This is important for showing the correct security |
| 2364 // state of the page and also honoring user override of bad certificates. | 2365 // state of the page and also honoring user override of bad certificates. |
| 2365 GetInterfaceRegistry()->AddInterface( | 2366 GetInterfaceRegistry()->AddInterface( |
| 2366 base::Bind(&WebSocketManager::CreateWebSocket, | 2367 base::Bind(&WebSocketManager::CreateWebSocket, |
| 2367 process_->GetID(), | 2368 process_->GetID(), |
| 2368 routing_id_)); | 2369 routing_id_)); |
| 2369 | 2370 |
| 2370 #if defined(ENABLE_WEBVR) | 2371 #if BUILDFLAG(ENABLE_WEBVR) |
| 2371 GetInterfaceRegistry()->AddInterface<device::mojom::VRService>( | 2372 GetInterfaceRegistry()->AddInterface<device::mojom::VRService>( |
| 2372 base::Bind(&device::VRServiceImpl::Create)); | 2373 base::Bind(&device::VRServiceImpl::Create)); |
| 2373 #else | 2374 #else |
| 2374 GetInterfaceRegistry()->AddInterface<device::mojom::VRService>( | 2375 GetInterfaceRegistry()->AddInterface<device::mojom::VRService>( |
| 2375 base::Bind(&IgnoreInterfaceRequest<device::mojom::VRService>)); | 2376 base::Bind(&IgnoreInterfaceRequest<device::mojom::VRService>)); |
| 2376 #endif | 2377 #endif |
| 2377 | 2378 |
| 2378 if (base::FeatureList::IsEnabled(features::kGenericSensor)) { | 2379 if (base::FeatureList::IsEnabled(features::kGenericSensor)) { |
| 2379 GetInterfaceRegistry()->AddInterface( | 2380 GetInterfaceRegistry()->AddInterface( |
| 2380 base::Bind(&device::SensorProviderImpl::Create, | 2381 base::Bind(&device::SensorProviderImpl::Create, |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3496 GetUserData(kRenderFrameHostAndroidKey)); | 3497 GetUserData(kRenderFrameHostAndroidKey)); |
| 3497 if (!render_frame_host_android) { | 3498 if (!render_frame_host_android) { |
| 3498 render_frame_host_android = new RenderFrameHostAndroid(this); | 3499 render_frame_host_android = new RenderFrameHostAndroid(this); |
| 3499 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); | 3500 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); |
| 3500 } | 3501 } |
| 3501 return render_frame_host_android->GetJavaObject(); | 3502 return render_frame_host_android->GetJavaObject(); |
| 3502 } | 3503 } |
| 3503 #endif | 3504 #endif |
| 3504 | 3505 |
| 3505 } // namespace content | 3506 } // namespace content |
| OLD | NEW |