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

Unified Diff: device/wake_lock/public/interfaces/wake_lock_service.mojom

Issue 2843353003: Move ownership of PowerSaveBlocker from WakeLockServiceContext to WakeLockServiceImpl (Closed)
Patch Set: correct some trivial #includes 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/public/interfaces/wake_lock_service.mojom
diff --git a/device/wake_lock/public/interfaces/wake_lock_service.mojom b/device/wake_lock/public/interfaces/wake_lock_service.mojom
index 8c6e7a494c0f32fd97537713ab2222585860d65f..534fcf860a77b74d8144010c43c2f52b0cf45f98 100644
--- a/device/wake_lock/public/interfaces/wake_lock_service.mojom
+++ b/device/wake_lock/public/interfaces/wake_lock_service.mojom
@@ -6,6 +6,19 @@ module device.mojom;
// WebLockService receives wake lock preferences from its client.
interface WakeLockService {
+ // Request WakeLock Service from WakeLockServiceImpl.
blundell 2017/05/05 12:49:37 nit: I would write something like: "Requests that
ke.he 2017/05/05 14:56:36 Thanks very much. I'm sorry for my poor english. "
+ // Each WakeLockServiceImpl instance owns only 1 PowerSaveBlocker.
+ // If client calls RequestWakeLock() multiple times consecutively,
+ // WakeLockServiceImpl only handles the first one.
RequestWakeLock();
+
+ // Cancel WakeLock Service.
blundell 2017/05/05 12:49:37 "Cancels any outstanding wake lock request from th
ke.he 2017/05/05 14:56:36 Done.
CancelWakeLock();
+
+ // Add other clients to current WakeLockServiceImpl so it can serve multiple
blundell 2017/05/05 12:49:37 "Adds a client to this WakeLockService instance. C
ke.he 2017/05/05 14:56:36 Done.
+ // clients.
+ AddClient(WakeLockService& wake_lock);
+
+ // Test-only method that returns whether a wake lock is currently active.
+ HasWakeLockForTests() => (bool result);
};

Powered by Google App Engine
This is Rietveld 408576698