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

Unified Diff: device/wake_lock/wake_lock_service_impl.cc

Issue 2874013002: Add GetWakeLockWithoutContext() in WakeLockContextProvider mojo interface. (Closed)
Patch Set: Add GetWakeLockWithoutContext in WakeLockContextProvider mojo interface. Created 3 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: device/wake_lock/wake_lock_service_impl.cc
diff --git a/device/wake_lock/wake_lock_service_impl.cc b/device/wake_lock/wake_lock_service_impl.cc
index f5ca821d762bfd2f23240bc8aa5a54a9a4024acd..fcf4660806abe7b82cc0611d39bae21aa1b6857f 100644
--- a/device/wake_lock/wake_lock_service_impl.cc
+++ b/device/wake_lock/wake_lock_service_impl.cc
@@ -133,6 +133,9 @@ void WakeLockServiceImpl::CreateWakeLock() {
return;
#if defined(OS_ANDROID)
+ if (context_id_ == WakeLockServiceContext::WakeLockInvalidContextId)
+ return;
blundell 2017/05/12 12:42:18 Maybe we should LOG(ERROR) here, as if the client
ke.he 2017/05/12 16:09:38 Done.
+
gfx::NativeView native_view = native_view_getter_.Run(context_id_);
if (native_view)
wake_lock_.get()->InitDisplaySleepBlocker(native_view);

Powered by Google App Engine
This is Rietveld 408576698