1 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef GeckoBatteryManager_h
7 #define GeckoBatteryManager_h
9 #include "nsAppShell.h"
11 #include "mozilla/Hal.h"
12 #include "mozilla/java/GeckoBatteryManagerNatives.h"
16 class GeckoBatteryManager final
17 : public java::GeckoBatteryManager::Natives
<GeckoBatteryManager
> {
19 static void OnBatteryChange(double aLevel
, bool aCharging
,
20 double aRemainingTime
) {
21 hal::NotifyBatteryChange(
22 hal::BatteryInformation(aLevel
, aCharging
, aRemainingTime
));
26 } // namespace mozilla
28 #endif // GeckoBatteryManager_h