| 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 17 matching lines...) Expand all Loading... |
| 28 #include "content/browser/frame_host/frame_tree.h" | 28 #include "content/browser/frame_host/frame_tree.h" |
| 29 #include "content/browser/frame_host/frame_tree_node.h" | 29 #include "content/browser/frame_host/frame_tree_node.h" |
| 30 #include "content/browser/frame_host/navigation_entry_impl.h" | 30 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 31 #include "content/browser/frame_host/navigation_handle_impl.h" | 31 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 32 #include "content/browser/frame_host/navigation_request.h" | 32 #include "content/browser/frame_host/navigation_request.h" |
| 33 #include "content/browser/frame_host/navigator.h" | 33 #include "content/browser/frame_host/navigator.h" |
| 34 #include "content/browser/frame_host/navigator_impl.h" | 34 #include "content/browser/frame_host/navigator_impl.h" |
| 35 #include "content/browser/frame_host/render_frame_host_delegate.h" | 35 #include "content/browser/frame_host/render_frame_host_delegate.h" |
| 36 #include "content/browser/frame_host/render_frame_proxy_host.h" | 36 #include "content/browser/frame_host/render_frame_proxy_host.h" |
| 37 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 37 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 38 #include "content/browser/geolocation/geolocation_service_context.h" |
| 38 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 39 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 39 #include "content/browser/permissions/permission_service_context.h" | 40 #include "content/browser/permissions/permission_service_context.h" |
| 40 #include "content/browser/permissions/permission_service_impl.h" | 41 #include "content/browser/permissions/permission_service_impl.h" |
| 41 #include "content/browser/presentation/presentation_service_impl.h" | 42 #include "content/browser/presentation/presentation_service_impl.h" |
| 42 #include "content/browser/renderer_host/input/input_router_impl.h" | 43 #include "content/browser/renderer_host/input/input_router_impl.h" |
| 43 #include "content/browser/renderer_host/input/timeout_monitor.h" | 44 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| 44 #include "content/browser/renderer_host/render_process_host_impl.h" | 45 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 45 #include "content/browser/renderer_host/render_view_host_delegate.h" | 46 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 46 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 47 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
| 47 #include "content/browser/renderer_host/render_view_host_impl.h" | 48 #include "content/browser/renderer_host/render_view_host_impl.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 72 #include "content/public/browser/stream_handle.h" | 73 #include "content/public/browser/stream_handle.h" |
| 73 #include "content/public/browser/user_metrics.h" | 74 #include "content/public/browser/user_metrics.h" |
| 74 #include "content/public/common/browser_side_navigation_policy.h" | 75 #include "content/public/common/browser_side_navigation_policy.h" |
| 75 #include "content/public/common/content_constants.h" | 76 #include "content/public/common/content_constants.h" |
| 76 #include "content/public/common/content_switches.h" | 77 #include "content/public/common/content_switches.h" |
| 77 #include "content/public/common/file_chooser_file_info.h" | 78 #include "content/public/common/file_chooser_file_info.h" |
| 78 #include "content/public/common/file_chooser_params.h" | 79 #include "content/public/common/file_chooser_params.h" |
| 79 #include "content/public/common/isolated_world_ids.h" | 80 #include "content/public/common/isolated_world_ids.h" |
| 80 #include "content/public/common/url_constants.h" | 81 #include "content/public/common/url_constants.h" |
| 81 #include "content/public/common/url_utils.h" | 82 #include "content/public/common/url_utils.h" |
| 82 #include "device/geolocation/geolocation_service_context.h" | |
| 83 #include "device/vibration/vibration_manager_impl.h" | 83 #include "device/vibration/vibration_manager_impl.h" |
| 84 #include "services/shell/public/cpp/connector.h" | 84 #include "services/shell/public/cpp/connector.h" |
| 85 #include "services/shell/public/cpp/interface_provider.h" | 85 #include "services/shell/public/cpp/interface_provider.h" |
| 86 #include "ui/accessibility/ax_tree.h" | 86 #include "ui/accessibility/ax_tree.h" |
| 87 #include "ui/accessibility/ax_tree_update.h" | 87 #include "ui/accessibility/ax_tree_update.h" |
| 88 #include "ui/gfx/geometry/quad_f.h" | 88 #include "ui/gfx/geometry/quad_f.h" |
| 89 #include "url/gurl.h" | 89 #include "url/gurl.h" |
| 90 | 90 |
| 91 // media::mojom::ServiceFactory is generated in GN builds only. | 91 // media::mojom::ServiceFactory is generated in GN builds only. |
| 92 #if defined(MOJO_SHELL_CLIENT) | 92 #if defined(MOJO_SHELL_CLIENT) |
| (...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2044 | 2044 |
| 2045 void RenderFrameHostImpl::OnHidePopup() { | 2045 void RenderFrameHostImpl::OnHidePopup() { |
| 2046 RenderViewHostDelegateView* view = | 2046 RenderViewHostDelegateView* view = |
| 2047 render_view_host_->delegate_->GetDelegateView(); | 2047 render_view_host_->delegate_->GetDelegateView(); |
| 2048 if (view) | 2048 if (view) |
| 2049 view->HidePopupMenu(); | 2049 view->HidePopupMenu(); |
| 2050 } | 2050 } |
| 2051 #endif | 2051 #endif |
| 2052 | 2052 |
| 2053 void RenderFrameHostImpl::RegisterMojoInterfaces() { | 2053 void RenderFrameHostImpl::RegisterMojoInterfaces() { |
| 2054 device::GeolocationServiceContext* geolocation_service_context = | 2054 GeolocationServiceContext* geolocation_service_context = |
| 2055 delegate_ ? delegate_->GetGeolocationServiceContext() : NULL; | 2055 delegate_ ? delegate_->GetGeolocationServiceContext() : NULL; |
| 2056 if (geolocation_service_context) { | 2056 if (geolocation_service_context) { |
| 2057 // TODO(creis): Bind process ID here so that GeolocationServiceImpl | 2057 // TODO(creis): Bind process ID here so that GeolocationServiceImpl |
| 2058 // can perform permissions checks once site isolation is complete. | 2058 // can perform permissions checks once site isolation is complete. |
| 2059 // crbug.com/426384 | 2059 // crbug.com/426384 |
| 2060 // NOTE: At shutdown, there is no guaranteed ordering between destruction of | 2060 // NOTE: At shutdown, there is no guaranteed ordering between destruction of |
| 2061 // this object and destruction of any GeolocationServicesImpls created via | 2061 // this object and destruction of any GeolocationServicesImpls created via |
| 2062 // the below service registry, the reason being that the destruction of the | 2062 // the below service registry, the reason being that the destruction of the |
| 2063 // latter is triggered by receiving a message that the pipe was closed from | 2063 // latter is triggered by receiving a message that the pipe was closed from |
| 2064 // the renderer side. Hence, supply the reference to this object as a weak | 2064 // the renderer side. Hence, supply the reference to this object as a weak |
| 2065 // pointer. | 2065 // pointer. |
| 2066 GetInterfaceRegistry()->AddInterface( | 2066 GetInterfaceRegistry()->AddInterface( |
| 2067 base::Bind(&device::GeolocationServiceContext::CreateService, | 2067 base::Bind(&GeolocationServiceContext::CreateService, |
| 2068 base::Unretained(geolocation_service_context), | 2068 base::Unretained(geolocation_service_context), |
| 2069 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, | 2069 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, |
| 2070 weak_ptr_factory_.GetWeakPtr()))); | 2070 weak_ptr_factory_.GetWeakPtr()))); |
| 2071 } | 2071 } |
| 2072 | 2072 |
| 2073 WakeLockServiceContext* wake_lock_service_context = | 2073 WakeLockServiceContext* wake_lock_service_context = |
| 2074 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr; | 2074 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr; |
| 2075 if (wake_lock_service_context) { | 2075 if (wake_lock_service_context) { |
| 2076 // WakeLockServiceContext is owned by WebContentsImpl so it will outlive | 2076 // WakeLockServiceContext is owned by WebContentsImpl so it will outlive |
| 2077 // this RenderFrameHostImpl, hence a raw pointer can be bound to service | 2077 // this RenderFrameHostImpl, hence a raw pointer can be bound to service |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3023 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 3023 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
| 3024 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3024 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3025 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3025 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3026 } | 3026 } |
| 3027 | 3027 |
| 3028 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3028 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3029 web_bluetooth_service_.reset(); | 3029 web_bluetooth_service_.reset(); |
| 3030 } | 3030 } |
| 3031 | 3031 |
| 3032 } // namespace content | 3032 } // namespace content |
| OLD | NEW |