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

Unified Diff: chrome/common/extensions/api/power.idl

Issue 12576018: Add chrome.power extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update PermissionsTest.PermissionMessages Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
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..94a88c32de839230682ab028d8a0ac6b056c77e1
--- /dev/null
+++ b/chrome/common/extensions/api/power.idl
@@ -0,0 +1,20 @@
+// 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 {
+ interface Functions {
+ // Requests that power management be temporarily disabled. |level|
not at google - send to devlin 2013/03/19 21:16:39 Should level be an enum?
Daniel Erat 2013/03/19 23:39:38 Done.
+ // describes the degree to which power management should be disabled;
+ // "system" prevents the system from sleeping in response to user
+ // inactivity while "display" additionally prevents the display from
+ // being dimmed or turned off.
+ static void requestKeepAwake(optional DOMString level);
+
+ // Releases a request previously made via requestKeepAwake().
+ static void releaseKeepAwake();
+ };
+};

Powered by Google App Engine
This is Rietveld 408576698