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

Unified Diff: chrome/browser/chromeos/battery_status_provider_chromeos.h

Issue 10024013: chromeos: Add support for the battery status API on chromeos. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 months 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/battery_status_provider_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « no previous file | chrome/browser/chromeos/battery_status_provider_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698