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

Side by Side Diff: device/wake_lock/public/interfaces/wake_lock_service.mojom

Issue 2921823002: Rationalize WakeLock naming conventions (Closed)
Patch Set: rebase Created 3 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 module device.mojom;
6
7 // WebLockService receives wake lock preferences from its client.
8 interface WakeLockService {
9 // Requests that a wake lock be applied on behalf of this client. Has no
10 // effect if the client has previously called this method without
11 // subsequently calling CancelWakeLock().
12 RequestWakeLock();
13
14 // Cancels all outstanding wake lock requests from this client. If there are
15 // no more outstanding requests from any clients, the active wake lock (if
16 // there is one) will be turned off.
17 CancelWakeLock();
18
19 // Adds a client to this WakeLockService instance. Clients are grouped on a
20 // per-WakeLockService instance basis: that is, a given WakeLockService
21 // instance turns on its wake lock whenever *any* of its clients make a
22 // request to do so and turns off its wake lock only when *all* its clients
23 // that had previously called RequestWakelock() cancel their requests.
24 AddClient(WakeLockService& wake_lock);
25
26 // Test-only method that returns whether a wake lock is currently active.
27 HasWakeLockForTests() => (bool result);
28 };
OLDNEW
« no previous file with comments | « device/wake_lock/public/interfaces/wake_lock_provider.mojom ('k') | device/wake_lock/wake_lock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698