Bug 1877752 - Remove now-unused use_counter error metric. r=chutten
[gecko.git] / widget / android / GeckoBatteryManager.h
blobd9a171d0d107209f85727a1f8a5b51347bd39ca5
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"
14 namespace mozilla {
16 class GeckoBatteryManager final
17 : public java::GeckoBatteryManager::Natives<GeckoBatteryManager> {
18 public:
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