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

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: Applied review comments Created 5 years, 7 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
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index eaafbdf24dbab7c79646431afacc5346749585ae..066f2abec171f4063dcefb7fcb1f0137a8a2eb39 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -157,6 +157,7 @@
#include "modules/presentation/PresentationController.h"
#include "modules/push_messaging/PushController.h"
#include "modules/screen_orientation/ScreenOrientationController.h"
+#include "modules/wake_lock/WakeLockController.h"
#include "platform/ScriptForbiddenScope.h"
#include "platform/TraceEvent.h"
#include "platform/UserGestureIndicator.h"
@@ -1641,6 +1642,8 @@ void WebLocalFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame> frame)
provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->webMIDIClient() : nullptr));
provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
+ if (RuntimeEnabledFeatures::wakeLockEnabled())
+ WakeLockController::provideTo(*m_frame, m_client ? m_client->wakeLockClient() : nullptr);
mlamouri (slow - plz ping) 2015/05/05 13:45:44 nit: could you append that to the block instead of
mlamouri (slow - plz ping) 2015/05/05 13:45:44 nit: could you append that to the block instead of
if (RuntimeEnabledFeatures::screenOrientationEnabled())
ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->webScreenOrientationClient() : nullptr);
if (RuntimeEnabledFeatures::presentationEnabled())

Powered by Google App Engine
This is Rietveld 408576698