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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1084923002: Wake Lock API implementation (Blink part) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | « Source/platform/RuntimeEnabledFeatures.in ('k') | Source/web/tests/ScreenWakeLockTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 4d6ff29c55f90458d85c590890f1e3b49e259e77..0b7831a7fd73f70375bc916b32e6930230296e89 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -162,6 +162,7 @@
#include "modules/push_messaging/PushController.h"
#include "modules/screen_orientation/ScreenOrientationController.h"
#include "modules/vr/VRController.h"
+#include "modules/wake_lock/ScreenWakeLock.h"
#include "platform/ScriptForbiddenScope.h"
#include "platform/TraceEvent.h"
#include "platform/UserGestureIndicator.h"
@@ -1718,6 +1719,8 @@ void WebLocalFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame> frame)
PermissionController::provideTo(*m_frame, m_client ? m_client->permissionClient() : 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);
}
}
« no previous file with comments | « Source/platform/RuntimeEnabledFeatures.in ('k') | Source/web/tests/ScreenWakeLockTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698