widget/android/GeckoBatteryManager.h
author Brian Birtles <birtles@gmail.com>
Mon, 07 May 2018 11:15:16 +0900
changeset 417845 7eae2c106d30b402e5c070bc3ae8b05cc59e78aa
parent 310191 d4035843d2aacd9a8eebeeba4bbab8a55537658b
child 448947 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1456394 - Rename AnimationEffectReadOnly to AnimationEffect; r=bz,hiro MozReview-Commit-ID: 8jzJiCWt5vs

/* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef GeckoBatteryManager_h
#define GeckoBatteryManager_h

#include "GeneratedJNINatives.h"
#include "nsAppShell.h"

#include "mozilla/Hal.h"

namespace mozilla {

class GeckoBatteryManager final
    : public java::GeckoBatteryManager::Natives<GeckoBatteryManager>
{
public:
    static void
    OnBatteryChange(double aLevel, bool aCharging, double aRemainingTime)
    {
        hal::NotifyBatteryChange(
                hal::BatteryInformation(aLevel, aCharging, aRemainingTime));
    }
};

} // namespace mozilla

#endif // GeckoBatteryManager_h