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

Unified Diff: Source/modules/battery/BatteryManager.idl

Issue 182613002: Add support to Battery Status API in blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add NeedsRebaseline for 4 tests for Mac. Created 6 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: Source/modules/battery/BatteryManager.idl
diff --git a/Source/modules/battery/BatteryManager.idl b/Source/modules/battery/BatteryManager.idl
new file mode 100644
index 0000000000000000000000000000000000000000..a6edcf17eed9f43ca0e1cfa4a6be3ff2fb69302a
--- /dev/null
+++ b/Source/modules/battery/BatteryManager.idl
@@ -0,0 +1,21 @@
+// Copyright 2014 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.
+
+// http://dev.w3.org/2009/dap/system-info/battery-status.html
+[
+ NoInterfaceObject,
+ RuntimeEnabled=BatteryStatus,
+] interface BatteryManager : EventTarget {
+ readonly attribute boolean charging;
+ readonly attribute double chargingTime;
+ readonly attribute double dischargingTime;
+ readonly attribute double level;
+
+ attribute EventHandler onchargingchange;
+ attribute EventHandler onchargingtimechange;
+ attribute EventHandler ondischargingtimechange;
+ attribute EventHandler onlevelchange;
+
+};
+

Powered by Google App Engine
This is Rietveld 408576698