Chromium Code Reviews| 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..417b6d7cceb6323fd651c4a1b6b21c75f89d03cc 100644 |
| --- a/device/wake_lock/public/interfaces/wake_lock_service.mojom |
| +++ b/device/wake_lock/public/interfaces/wake_lock_service.mojom |
| @@ -6,6 +6,23 @@ module device.mojom; |
| // WebLockService receives wake lock preferences from its client. |
| interface WakeLockService { |
| + // Requests that a wake lock be applied on behalf of this client. Has no |
| + // effect if the client has previously called this method without |
| + // subsequently calling CancelWakeLock(). |
| RequestWakeLock(); |
| + |
| + // Cancels any outstanding wake lock request from this client. If there are |
|
Ken Rockot(use gerrit already)
2017/05/05 17:55:31
nit: How about "all outstanding wake lock requests
ke.he
2017/05/06 03:08:43
Done.
|
| + // no more outstanding requests from any clients, the active wake lock (if |
| + // there is one) will be turned off. |
| CancelWakeLock(); |
| + |
| + // Adds a client to this WakeLockService instance. Clients are grouped on a |
| + // per-WakeLockService instance basis: that is, a given WakeLockService |
| + // instance turns on its wake lock whenever *any* of its clients make a |
| + // request to do so and turns off its wake lock only when *all* its clients |
| + // that had previously called RequestWakelock() cancel their requests. |
| + AddClient(WakeLockService& wake_lock); |
| + |
| + // Test-only method that returns whether a wake lock is currently active. |
| + HasWakeLockForTests() => (bool result); |
| }; |