| Index: Source/modules/battery/NavigatorBattery.h
|
| diff --git a/Source/modules/vibration/NavigatorVibration.idl b/Source/modules/battery/NavigatorBattery.h
|
| similarity index 53%
|
| copy from Source/modules/vibration/NavigatorVibration.idl
|
| copy to Source/modules/battery/NavigatorBattery.h
|
| index 2c2c140706f3fd4ea5ab31a9824ce1fc22550e07..518b97f3cb1f0da7285c514dbe2e012ecdebbcf3 100644
|
| --- a/Source/modules/vibration/NavigatorVibration.idl
|
| +++ b/Source/modules/battery/NavigatorBattery.h
|
| @@ -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,38 @@
|
| * 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);
|
| +#ifndef NavigatorBattery_h
|
| +#define NavigatorBattery_h
|
| +
|
| +#include "core/frame/Navigator.h"
|
| +#include "platform/Supplementable.h"
|
| +
|
| +namespace WebCore {
|
| +
|
| +class BatteryManager;
|
| +class Navigator;
|
| +class ScriptExecutionContext;
|
| +
|
| +class NavigatorBattery : public Supplement<Navigator>, DOMWindowProperty {
|
| +public:
|
| + virtual ~NavigatorBattery();
|
| +
|
| + static NavigatorBattery& from(Navigator&);
|
| +
|
| + static BatteryManager* battery(Navigator&);
|
| + BatteryManager* battery();
|
| +
|
| + BatteryManager* batteryManager();
|
| +
|
| +private:
|
| + NavigatorBattery(Frame*);
|
| + static const char* supplementName();
|
| +
|
| + RefPtr<BatteryManager> m_batteryManager;
|
| };
|
| +
|
| +} // namespace WebCore
|
| +
|
| +#endif // NavigatorBattery_h
|
| +
|
| +
|
|
|