Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1446)

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1794553002: [Playground] Onion Soup: moving ScreenWakeLock to Blink modules/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit DEPS Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/BUILD.gn ('k') | third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « third_party/WebKit/Source/web/BUILD.gn ('k') | third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698