Index: chrome/browser/chromeos/battery_status_provider_chromeos.h |
diff --git a/chrome/browser/chromeos/battery_status_provider_chromeos.h b/chrome/browser/chromeos/battery_status_provider_chromeos.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..09de8b937933b799fc88ae580d6ac9dfeb124ae3 |
--- /dev/null |
+++ b/chrome/browser/chromeos/battery_status_provider_chromeos.h |
@@ -0,0 +1,30 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_BATTERY_STATUS_PROVIDER_CHROMEOS_H_ |
+#define CHROME_BROWSER_CHROMEOS_BATTERY_STATUS_PROVIDER_CHROMEOS_H_ |
+ |
+#include "base/memory/singleton.h" |
+#include "chromeos/dbus/power_manager_client.h" |
+ |
+// This is a singleton object that receives battery information from the system |
+// and feeds the data to content. |
+class BatteryStatusProviderChromeos |
+ : public chromeos::PowerManagerClient::Observer { |
+ public: |
+ static BatteryStatusProviderChromeos* GetInstance(); |
+ |
+ private: |
+ friend struct DefaultSingletonTraits<BatteryStatusProviderChromeos>; |
+ |
+ BatteryStatusProviderChromeos(); |
+ virtual ~BatteryStatusProviderChromeos(); |
+ |
+ // Overridden from chromeos::PowerManagerClient::Observer. |
+ virtual void PowerChanged(const chromeos::PowerSupplyStatus& status) OVERRIDE; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BatteryStatusProviderChromeos); |
+}; |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_BATTERY_STATUS_PROVIDER_CHROMEOS_H_ |