| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "device/battery/battery_status_manager.h" | 5 #include "device/battery/battery_status_manager.h" |
| 6 | 6 |
| 7 #include <CoreFoundation/CoreFoundation.h> | 7 #include <CoreFoundation/CoreFoundation.h> |
| 8 #include <IOKit/ps/IOPowerSources.h> | 8 #include <IOKit/ps/IOPowerSources.h> |
| 9 #include <IOKit/ps/IOPSKeys.h> | 9 #include <IOKit/ps/IOPSKeys.h> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/mac/foundation_util.h" | 12 #include "base/mac/foundation_util.h" |
| 13 #include "base/mac/scoped_cftyperef.h" | 13 #include "base/mac/scoped_cftyperef.h" |
| 14 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
| 16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 17 | 18 |
| 18 namespace device { | 19 namespace device { |
| 19 | 20 |
| 20 namespace { | 21 namespace { |
| 21 | 22 |
| 22 typedef BatteryStatusService::BatteryUpdateCallback BatteryCallback; | 23 typedef BatteryStatusService::BatteryUpdateCallback BatteryCallback; |
| 23 | 24 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 } // end namespace | 235 } // end namespace |
| 235 | 236 |
| 236 // static | 237 // static |
| 237 scoped_ptr<BatteryStatusManager> BatteryStatusManager::Create( | 238 scoped_ptr<BatteryStatusManager> BatteryStatusManager::Create( |
| 238 const BatteryStatusService::BatteryUpdateCallback& callback) { | 239 const BatteryStatusService::BatteryUpdateCallback& callback) { |
| 239 return scoped_ptr<BatteryStatusManager>( | 240 return scoped_ptr<BatteryStatusManager>( |
| 240 new BatteryStatusManagerMac(callback)); | 241 new BatteryStatusManagerMac(callback)); |
| 241 } | 242 } |
| 242 | 243 |
| 243 } // namespace device | 244 } // namespace device |
| OLD | NEW |