Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: chrome/browser/chromeos/cros/power_library.h

Issue 8271024: chromeos: Add power supply info reading capability (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: use base/format_macros.h Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 e6ef46d0935746bf0869be3a7bcb9ba4dca79077..7b1b72487e3bd069e6d09eda95d859cadc1ebcd6 100644
--- a/chrome/browser/chromeos/cros/power_library.h
+++ b/chrome/browser/chromeos/cros/power_library.h
@@ -9,6 +9,7 @@
// 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;
@@ -18,26 +19,6 @@ namespace chromeos {
typedef base::Callback<void(int64_t)> CalculateIdleTimeCallback;
-struct PowerSupplyStatus {
- bool line_power_on;
-
- bool battery_is_present;
- bool battery_is_full;
-
- // Time in seconds until the battery is empty or full, 0 for unknown.
- int64 battery_seconds_to_empty;
- int64 battery_seconds_to_full;
-
- double battery_percentage;
-
- PowerSupplyStatus() : line_power_on(false),
- battery_is_present(false),
- battery_is_full(false),
- battery_seconds_to_empty(0),
- battery_seconds_to_full(0),
- battery_percentage(0) {}
-};
-
// 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()
@@ -45,7 +26,6 @@ class PowerLibrary {
public:
class Observer {
public:
- virtual void PowerChanged(const PowerSupplyStatus& status) = 0;
virtual void SystemResumed() = 0;
protected:
@@ -72,9 +52,6 @@ class PowerLibrary {
// Requests shutdown of the system.
virtual void RequestShutdown() = 0;
- // UI initiated request for status update.
- virtual void RequestStatusUpdate() = 0;
satorux1 2011/11/04 22:52:30 You should remove this from mock_power_library.h i
Simon Que 2011/11/04 22:57:59 Done.
-
// Factory function, creates a new instance and returns ownership.
// For normal usage, access the singleton via CrosLibrary::Get().
static PowerLibrary* GetImpl(bool stub);

Powered by Google App Engine
This is Rietveld 408576698