| Index: chrome/browser/chromeos/cros/power_library.h
|
| diff --git a/chrome/browser/chromeos/cros/power_library.h b/chrome/browser/chromeos/cros/power_library.h
|
| index f29699fe104974a0ff1c51342feb3393ef2d790f..f9daec78f8254243c5d8a4c7c6e7d4854dac8bbc 100644
|
| --- a/chrome/browser/chromeos/cros/power_library.h
|
| +++ b/chrome/browser/chromeos/cros/power_library.h
|
| @@ -15,6 +15,7 @@ class TimeDelta;
|
| namespace chromeos {
|
|
|
| typedef base::Callback<void(int64_t)> CalculateIdleTimeCallback;
|
| +struct PowerStatus;
|
|
|
| // This interface defines interaction with the ChromeOS power library APIs.
|
| // Classes can add themselves as observers. Users can get an instance of this
|
| @@ -23,7 +24,7 @@ class PowerLibrary {
|
| public:
|
| class Observer {
|
| public:
|
| - virtual void PowerChanged(PowerLibrary* obj) = 0;
|
| + virtual void PowerChanged(const PowerStatus& status) = 0;
|
| virtual void SystemResumed() = 0;
|
|
|
| protected:
|
| @@ -37,24 +38,6 @@ class PowerLibrary {
|
| virtual void AddObserver(Observer* observer) = 0;
|
| virtual void RemoveObserver(Observer* observer) = 0;
|
|
|
| - // Whether or not the line power is connected.
|
| - virtual bool IsLinePowerOn() const = 0;
|
| -
|
| - // Whether or not the battery is fully charged.
|
| - virtual bool IsBatteryFullyCharged() const = 0;
|
| -
|
| - // The percentage [0-100] of remaining battery.
|
| - virtual double GetBatteryPercentage() const = 0;
|
| -
|
| - // Whether there is a battery present.
|
| - virtual bool IsBatteryPresent() const = 0;
|
| -
|
| - // The amount of time until battery is empty.
|
| - virtual base::TimeDelta GetBatteryTimeToEmpty() const = 0;
|
| -
|
| - // The amount of time until battery is full.
|
| - virtual base::TimeDelta GetBatteryTimeToFull() const = 0;
|
| -
|
| // Calculates idle time asynchronously. If it encounters some error,
|
| // it returns -1.
|
| virtual void CalculateIdleTime(CalculateIdleTimeCallback* callback) = 0;
|
|
|