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

Side by Side Diff: content/public/browser/battery_status_provider.cc

Issue 10024013: chromeos: Add support for the battery status API on chromeos. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: file-move Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698