| Index: content/browser/frame_host/render_frame_host_impl.cc
|
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
| index ff676db56414b28a6a8986670d5def976e6e88b8..21677330e217287d6a139f04675a8ee5f67fdb93 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.cc
|
| +++ b/content/browser/frame_host/render_frame_host_impl.cc
|
| @@ -96,7 +96,8 @@
|
| #include "device/generic_sensor/sensor_provider_impl.h"
|
| #include "device/geolocation/geolocation_service_context.h"
|
| #include "device/vibration/vibration_manager_impl.h"
|
| -#include "device/wake_lock/wake_lock_service_context.h"
|
| +#include "device/wake_lock/public/interfaces/wake_lock_service.mojom.h"
|
| +#include "device/wake_lock/public/interfaces/wake_lock_service_context.mojom.h"
|
| #include "media/base/media_switches.h"
|
| #include "media/media_features.h"
|
| #include "media/mojo/interfaces/media_service.mojom.h"
|
| @@ -166,6 +167,11 @@ base::i18n::TextDirection WebTextDirectionToChromeTextDirection(
|
| }
|
| }
|
|
|
| +void BindWakeLockRequest(device::mojom::WakeLockServiceContext* context,
|
| + device::mojom::WakeLockServiceRequest request) {
|
| + context->BindWakeLock(std::move(request));
|
| +}
|
| +
|
| // Ensure that we reset nav_entry_id_ in OnDidCommitProvisionalLoad if any of
|
| // the validations fail and lead to an early return. Call disable() once we
|
| // know the commit will be successful. Resetting nav_entry_id_ avoids acting on
|
| @@ -2289,14 +2295,14 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
|
| base::Unretained(geolocation_service_context)));
|
| }
|
|
|
| - device::WakeLockServiceContext* wake_lock_service_context =
|
| + device::mojom::WakeLockServiceContext* wake_lock_service_context =
|
| delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr;
|
| if (wake_lock_service_context) {
|
| // WakeLockServiceContext is owned by WebContentsImpl so it will outlive
|
| // this RenderFrameHostImpl, hence a raw pointer can be bound to service
|
| // factory callback.
|
| GetInterfaceRegistry()->AddInterface<device::mojom::WakeLockService>(
|
| - base::Bind(&device::WakeLockServiceContext::CreateService,
|
| + base::Bind(&BindWakeLockRequest,
|
| base::Unretained(wake_lock_service_context)));
|
| }
|
|
|
|
|