Chromium Code Reviews| Index: chrome/browser/battery_status_provider_chromeos.h |
| diff --git a/chrome/browser/battery_status_provider_chromeos.h b/chrome/browser/battery_status_provider_chromeos.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..54f9667e0b9bf3f8629c060fff0be5c8d28a718b |
| --- /dev/null |
| +++ b/chrome/browser/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_BATTERY_STATUS_PROVIDER_CHROMEOS_H_ |
|
Ben Goodger (Google)
2012/04/11 21:09:11
-> chrome/browser/chromeos at least.
sadrul
2012/04/11 21:50:54
Done.
|
| +#define CHROME_BROWSER_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_BATTERY_STATUS_PROVIDER_CHROMEOS_H_ |