Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
index 071044920909f75247c02cbc3cd13ca391ecea19..6a244e3c0c028893ba4c3a9f15caef3173592820 100644 |
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
@@ -1449,7 +1449,6 @@ WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client, |
return webFrame; |
} |
- |
WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* client) |
: WebLocalFrame(scope) |
, m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this)) |
@@ -1527,6 +1526,9 @@ void WebLocalFrameImpl::setCoreFrame(LocalFrame* frame) |
if (enableWebBluetooth) |
BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth() : nullptr); |
+ if (RuntimeEnabledFeatures::wakeLockEnabled()) |
+ provideScreenWakeLockTo(*m_frame, client() ? client()->serviceRegistry() : nullptr); |
+ |
if (RuntimeEnabledFeatures::screenOrientationEnabled()) |
ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->webScreenOrientationClient() : nullptr); |
if (RuntimeEnabledFeatures::presentationEnabled()) |
@@ -1537,8 +1539,6 @@ void WebLocalFrameImpl::setCoreFrame(LocalFrame* frame) |
USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullptr); |
if (RuntimeEnabledFeatures::webVREnabled()) |
VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : nullptr); |
- if (RuntimeEnabledFeatures::wakeLockEnabled()) |
- ScreenWakeLock::provideTo(*m_frame, m_client ? m_client->wakeLockClient() : nullptr); |
if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) |
provideAudioOutputDeviceClientTo(*m_frame, AudioOutputDeviceClientImpl::create()); |
if (RuntimeEnabledFeatures::installedAppEnabled()) |