Generalize the API of WakeLockContext mojo interface.
Generalize the API of WakeLockContext mojo interface, so client can pass
type, reason and description as they want to create the WakeLockService.
BUG=689410
Review-Url: https://codereview.chromium.org/2867303003
Cr-Commit-Position: refs/heads/master@{#470801}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 3f5f76d9..ebbb7ef5 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2637,7 +2637,10 @@
if (!wake_lock_context) {
return nullptr;
}
- wake_lock_context->GetWakeLock(mojo::MakeRequest(&renderer_wake_lock_));
+ wake_lock_context->GetWakeLock(
+ device::mojom::WakeLockType::PreventDisplaySleep,
+ device::mojom::WakeLockReason::ReasonOther, "Wake Lock API",
+ mojo::MakeRequest(&renderer_wake_lock_));
}
return renderer_wake_lock_.get();
}