Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / extensions / common / api / power.idl
blob2a25353ac8979b6cc8944bb303d5fec37042c132
1 // Copyright 2014 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.
5 // Use the <code>chrome.power</code> API to override the system's power
6 // management features.
7 namespace power {
8 [noinline_doc] enum Level {
9 // Prevent the system from sleeping in response to user inactivity.
10 system,
12 // Prevent the display from being turned off or dimmed or the system
13 // from sleeping in response to user inactivity.
14 display
17 interface Functions {
18 // Requests that power management be temporarily disabled. |level|
19 // describes the degree to which power management should be disabled.
20 // If a request previously made by the same app is still active, it
21 // will be replaced by the new request.
22 static void requestKeepAwake(Level level);
24 // Releases a request previously made via requestKeepAwake().
25 static void releaseKeepAwake();