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 10f99f5b43bc1e2377fd1b7bf10cbbd405215cb7..3b152de49242e5ada6789c15fdcb898d184364e3 100644 |
--- a/chrome/browser/chromeos/cros/power_library.h |
+++ b/chrome/browser/chromeos/cros/power_library.h |
@@ -6,7 +6,10 @@ |
#define CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ |
#pragma once |
+// TODO(sque): Move to chrome/browser/chromeos/system, crosbug.com/16558 |
+ |
#include "base/callback.h" |
+#include "chrome/browser/chromeos/dbus/power_manager_client.h" |
namespace base { |
class TimeDelta; |
@@ -15,11 +18,12 @@ 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 |
// library class like this: chromeos::CrosLibrary::Get()->GetPowerLibrary() |
-class PowerLibrary { |
+class PowerLibrary : public PowerManagerClient::Observer { |
public: |
class Observer { |
public: |
@@ -71,6 +75,10 @@ class PowerLibrary { |
// UI initiated request for status update. |
virtual void RequestStatusUpdate() = 0; |
+ // Requests power supply info. |
+ virtual void UpdatePowerStatus(const chromeos::PowerStatus& status) = 0; |
+ |
+ |
// Factory function, creates a new instance and returns ownership. |
// For normal usage, access the singleton via CrosLibrary::Get(). |
static PowerLibrary* GetImpl(bool stub); |