Index: Source/modules/battery/BatteryManager.idl |
diff --git a/Source/modules/vibration/NavigatorVibration.idl b/Source/modules/battery/BatteryManager.idl |
similarity index 60% |
copy from Source/modules/vibration/NavigatorVibration.idl |
copy to Source/modules/battery/BatteryManager.idl |
index 2c2c140706f3fd4ea5ab31a9824ce1fc22550e07..a742b52248718b2854cdd74a0a7a4170c03d2338 100644 |
--- a/Source/modules/vibration/NavigatorVibration.idl |
+++ b/Source/modules/battery/BatteryManager.idl |
@@ -1,5 +1,6 @@ |
/* |
* Copyright (C) 2012 Samsung Electronics |
+ * Copyright (C) 2014 Intel Corporation |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Library General Public |
@@ -17,9 +18,20 @@ |
* Boston, MA 02110-1301, USA. |
*/ |
-partial interface Navigator { |
- // FIXME: The contents of the pattern argument should be clamped. |
- // See https://code.google.com/p/chromium/issues/detail?id=310138 |
- boolean vibrate(sequence<unsigned long> pattern); |
- boolean vibrate([Clamp] unsigned long time); |
+// http://dev.w3.org/2009/dap/system-info/battery-status.html |
+[ |
+ NoInterfaceObject, |
+ ActiveDOMObject, |
+] 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; |
+ |
}; |
+ |