OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 // An API that can be used to override the system's power management | 5 // Use the <code>chrome.power</code> API to override the system's power |
6 // features. | 6 // management features. |
7 namespace power { | 7 namespace power { |
8 [noinline_doc] enum Level { | 8 [noinline_doc] enum Level { |
9 // Prevent the system from sleeping in response to user inactivity. | 9 // Prevent the system from sleeping in response to user inactivity. |
10 system, | 10 system, |
11 | 11 |
12 // Prevent the display from being turned off or dimmed or the system | 12 // Prevent the display from being turned off or dimmed or the system |
13 // from sleeping in response to user inactivity. | 13 // from sleeping in response to user inactivity. |
14 display | 14 display |
15 }; | 15 }; |
16 | 16 |
17 interface Functions { | 17 interface Functions { |
18 // Requests that power management be temporarily disabled. |level| | 18 // Requests that power management be temporarily disabled. |level| |
19 // describes the degree to which power management should be disabled. | 19 // describes the degree to which power management should be disabled. |
20 static void requestKeepAwake(Level level); | 20 static void requestKeepAwake(Level level); |
21 | 21 |
22 // Releases a request previously made via requestKeepAwake(). | 22 // Releases a request previously made via requestKeepAwake(). |
23 static void releaseKeepAwake(); | 23 static void releaseKeepAwake(); |
24 }; | 24 }; |
25 }; | 25 }; |
OLD | NEW |