Index: content/public/browser/battery_status_provider.cc |
diff --git a/content/public/browser/battery_status_provider.cc b/content/public/browser/battery_status_provider.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fdda005e8ef04aff2971f84648c4b028e236bd32 |
--- /dev/null |
+++ b/content/public/browser/battery_status_provider.cc |
@@ -0,0 +1,32 @@ |
+// 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. |
+ |
+#include "content/public/browser/battery_status_provider.h" |
+ |
+namespace content { |
+ |
+BatteryStatusProvider* BatteryStatusProvider::GetInstance() { |
+ return Singleton<BatteryStatusProvider>::get(); |
+} |
+ |
+void BatteryStatusProvider::AddObserver(BatteryStatusProvider::Observer* obs) { |
+ observers_.AddObserver(obs); |
+} |
+ |
+void BatteryStatusProvider::RemoveObserver( |
+ BatteryStatusProvider::Observer* obs) { |
+ observers_.RemoveObserver(obs); |
+} |
+ |
+void BatteryStatusProvider::SendUpdate(const PowerSupplyStatus& status) { |
+ FOR_EACH_OBSERVER(Observer, observers_, PowerChanged(status)); |
+} |
+ |
+BatteryStatusProvider::BatteryStatusProvider() { |
+} |
+ |
+BatteryStatusProvider::~BatteryStatusProvider() { |
+} |
+ |
+} // namespace content |