Commit 293f0a22 authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

Re-enable Wake Lock Origin Trial

The Wake Lock feature was supposed to be in Origin Trial from Chrome 79
to 82 however Chrome 82 has been canceled due to COVID-19 and so we are
extending the OT through Chrome 83 to give us time to integrate recent
specification changes that missed the branch point.

Bug: 257511
Change-Id: I3df4ad65029b042eb8c9eada9bf7cae5f7cad4f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134400Reviewed-by: default avatarAlex Russell <slightlyoff@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756387}
parent 8f3abd47
......@@ -56,7 +56,8 @@ ScriptPromise WakeLock::request(ScriptState* script_state,
auto* context = ExecutionContext::From(script_state);
DCHECK(context->IsDocument() || context->IsDedicatedWorkerGlobalScope());
if (type == "screen" && !RuntimeEnabledFeatures::ScreenWakeLockEnabled()) {
if (type == "screen" &&
!RuntimeEnabledFeatures::ScreenWakeLockEnabled(context)) {
exception_state.ThrowTypeError(
"The provided value 'screen' is not a valid enum value of type "
"WakeLockType.");
......
......@@ -1530,6 +1530,7 @@
},
{
name: "ScreenWakeLock",
origin_trial_feature_name: "WakeLock",
status: "experimental",
},
// WebSpeech API with both speech recognition and synthesis functionality
......@@ -1812,6 +1813,7 @@
},
{
name: "WakeLock",
origin_trial_feature_name: "WakeLock",
implied_by: ['ScreenWakeLock', 'SystemWakeLock'],
},
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment