OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module device.mojom; | 5 module device.mojom; |
6 | 6 |
7 // WebLockService receives wake lock preferences from its client. | 7 // WebLockService receives wake lock preferences from its client. |
8 interface WakeLockService { | 8 interface WakeLockService { |
9 // 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.
"
| |
10 // Each WakeLockServiceImpl instance owns only 1 PowerSaveBlocker. | |
11 // If client calls RequestWakeLock() multiple times consecutively, | |
12 // WakeLockServiceImpl only handles the first one. | |
9 RequestWakeLock(); | 13 RequestWakeLock(); |
14 | |
15 // 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.
| |
10 CancelWakeLock(); | 16 CancelWakeLock(); |
17 | |
18 // 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.
| |
19 // clients. | |
20 AddClient(WakeLockService& wake_lock); | |
21 | |
22 // Test-only method that returns whether a wake lock is currently active. | |
23 HasWakeLockForTests() => (bool result); | |
11 }; | 24 }; |
OLD | NEW |