OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/public/browser/battery_status_provider.h" |
| 6 |
| 7 namespace content { |
| 8 |
| 9 BatteryStatusProvider* BatteryStatusProvider::GetInstance() { |
| 10 return Singleton<BatteryStatusProvider>::get(); |
| 11 } |
| 12 |
| 13 void BatteryStatusProvider::AddObserver(BatteryStatusProvider::Observer* obs) { |
| 14 observers_.AddObserver(obs); |
| 15 } |
| 16 |
| 17 void BatteryStatusProvider::RemoveObserver( |
| 18 BatteryStatusProvider::Observer* obs) { |
| 19 observers_.RemoveObserver(obs); |
| 20 } |
| 21 |
| 22 void BatteryStatusProvider::SendUpdate(const PowerSupplyStatus& status) { |
| 23 FOR_EACH_OBSERVER(Observer, observers_, PowerChanged(status)); |
| 24 } |
| 25 |
| 26 BatteryStatusProvider::BatteryStatusProvider() { |
| 27 } |
| 28 |
| 29 BatteryStatusProvider::~BatteryStatusProvider() { |
| 30 } |
| 31 |
| 32 } // namespace content |
OLD | NEW |