| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "content/public/browser/render_widget_host_view.h" | 71 #include "content/public/browser/render_widget_host_view.h" |
| 72 #include "content/public/browser/storage_partition.h" | 72 #include "content/public/browser/storage_partition.h" |
| 73 #include "content/public/browser/stream_handle.h" | 73 #include "content/public/browser/stream_handle.h" |
| 74 #include "content/public/browser/user_metrics.h" | 74 #include "content/public/browser/user_metrics.h" |
| 75 #include "content/public/common/browser_side_navigation_policy.h" | 75 #include "content/public/common/browser_side_navigation_policy.h" |
| 76 #include "content/public/common/content_constants.h" | 76 #include "content/public/common/content_constants.h" |
| 77 #include "content/public/common/content_switches.h" | 77 #include "content/public/common/content_switches.h" |
| 78 #include "content/public/common/file_chooser_file_info.h" | 78 #include "content/public/common/file_chooser_file_info.h" |
| 79 #include "content/public/common/file_chooser_params.h" | 79 #include "content/public/common/file_chooser_params.h" |
| 80 #include "content/public/common/isolated_world_ids.h" | 80 #include "content/public/common/isolated_world_ids.h" |
| 81 #include "content/public/common/mojo_shell_connection.h" |
| 81 #include "content/public/common/url_constants.h" | 82 #include "content/public/common/url_constants.h" |
| 82 #include "content/public/common/url_utils.h" | 83 #include "content/public/common/url_utils.h" |
| 83 #include "device/geolocation/geolocation_service_context.h" | 84 #include "device/geolocation/geolocation_service_context.h" |
| 84 #include "device/vibration/vibration_manager_impl.h" | 85 #include "device/vibration/vibration_manager_impl.h" |
| 85 #include "media/mojo/interfaces/media_service.mojom.h" | 86 #include "media/mojo/interfaces/media_service.mojom.h" |
| 86 #include "media/mojo/interfaces/service_factory.mojom.h" | 87 #include "media/mojo/interfaces/service_factory.mojom.h" |
| 87 #include "services/shell/public/cpp/connector.h" | 88 #include "services/shell/public/cpp/connector.h" |
| 88 #include "services/shell/public/cpp/interface_provider.h" | 89 #include "services/shell/public/cpp/interface_provider.h" |
| 89 #include "ui/accessibility/ax_tree.h" | 90 #include "ui/accessibility/ax_tree.h" |
| 90 #include "ui/accessibility/ax_tree_update.h" | 91 #include "ui/accessibility/ax_tree_update.h" |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 #if defined(OS_ANDROID) && defined(ENABLE_MOJO_CDM) | 793 #if defined(OS_ANDROID) && defined(ENABLE_MOJO_CDM) |
| 793 registry->AddInterface( | 794 registry->AddInterface( |
| 794 base::Bind(&ProvisionFetcherImpl::Create, this)); | 795 base::Bind(&ProvisionFetcherImpl::Create, this)); |
| 795 #endif | 796 #endif |
| 796 GetContentClient()->browser()->ExposeInterfacesToMediaService(registry.get(), | 797 GetContentClient()->browser()->ExposeInterfacesToMediaService(registry.get(), |
| 797 this); | 798 this); |
| 798 shell::mojom::InterfaceProviderPtr interfaces; | 799 shell::mojom::InterfaceProviderPtr interfaces; |
| 799 registry->Bind(GetProxy(&interfaces)); | 800 registry->Bind(GetProxy(&interfaces)); |
| 800 media_registries_.push_back(std::move(registry)); | 801 media_registries_.push_back(std::move(registry)); |
| 801 | 802 |
| 803 // TODO(slan): Use the BrowserContext Connector instead. See crbug.com/638950. |
| 802 media::mojom::MediaServicePtr media_service; | 804 media::mojom::MediaServicePtr media_service; |
| 803 shell::Connector* connector = | 805 shell::Connector* connector = |
| 804 BrowserContext::GetShellConnectorFor(GetProcess()->GetBrowserContext()); | 806 MojoShellConnection::GetForProcess()->GetConnector(); |
| 805 connector->ConnectToInterface("mojo:media", &media_service); | 807 connector->ConnectToInterface("mojo:media", &media_service); |
| 806 media_service->CreateServiceFactory(std::move(request), | 808 media_service->CreateServiceFactory(std::move(request), |
| 807 std::move(interfaces)); | 809 std::move(interfaces)); |
| 808 } | 810 } |
| 809 | 811 |
| 810 bool RenderFrameHostImpl::CreateRenderFrame(int proxy_routing_id, | 812 bool RenderFrameHostImpl::CreateRenderFrame(int proxy_routing_id, |
| 811 int opener_routing_id, | 813 int opener_routing_id, |
| 812 int parent_routing_id, | 814 int parent_routing_id, |
| 813 int previous_sibling_routing_id) { | 815 int previous_sibling_routing_id) { |
| 814 TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame"); | 816 TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame"); |
| (...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3044 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3046 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3045 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3047 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3046 return web_bluetooth_service_.get(); | 3048 return web_bluetooth_service_.get(); |
| 3047 } | 3049 } |
| 3048 | 3050 |
| 3049 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3051 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3050 web_bluetooth_service_.reset(); | 3052 web_bluetooth_service_.reset(); |
| 3051 } | 3053 } |
| 3052 | 3054 |
| 3053 } // namespace content | 3055 } // namespace content |
| OLD | NEW |