Chromium Code Reviews| Index: chrome/common/extensions/api/power.idl |
| diff --git a/chrome/common/extensions/api/power.idl b/chrome/common/extensions/api/power.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..97f1126027461f6872ed35786430cdb0b13e8e66 |
| --- /dev/null |
| +++ b/chrome/common/extensions/api/power.idl |
| @@ -0,0 +1,26 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// An API that can be used to override the system's power management |
| +// features. |
| +[permissions=power] |
| +namespace power { |
| + enum Level { |
| + // Prevent the system from sleeping in response to user inactivity. |
| + system, |
| + |
| + // Prevent the display from being turned off or dimmed or the system |
| + // from sleeping in response to user inactivity. |
| + display |
| + }; |
| + |
| + interface Functions { |
| + // Requests that power management be temporarily disabled. |level| |
| + // describes the degree to which power management should be disabled. |
| + static void requestKeepAwake(optional Level level); |
|
not at google - send to devlin
2013/03/20 00:25:50
Document what it means for level to be left out? O
Daniel Erat
2013/03/20 00:47:46
Done (required).
|
| + |
| + // Releases a request previously made via requestKeepAwake(). |
| + static void releaseKeepAwake(); |
| + }; |
| +}; |