OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BatteryStatus_h |
| 6 #define BatteryStatus_h |
| 7 |
| 8 #include "wtf/PassOwnPtr.h" |
| 9 #include "wtf/RefCounted.h" |
| 10 |
| 11 namespace WebCore { |
| 12 |
| 13 class BatteryStatus { |
| 14 public: |
| 15 static PassOwnPtr<BatteryStatus> create(); |
| 16 static PassOwnPtr<BatteryStatus> create(bool charging, double chargingTime,
double dischargingTime, double level); |
| 17 |
| 18 bool charging() const { return m_charging; } |
| 19 double chargingTime() const { return m_chargingTime; } |
| 20 double dischargingTime() const { return m_dischargingTime; } |
| 21 double level() const { return m_level; } |
| 22 |
| 23 private: |
| 24 BatteryStatus(); |
| 25 BatteryStatus(bool charging, double chargingTime, double dischargingTime, do
uble level); |
| 26 |
| 27 bool m_charging; |
| 28 double m_chargingTime; |
| 29 double m_dischargingTime; |
| 30 double m_level; |
| 31 }; |
| 32 |
| 33 } // namespace WebCore |
| 34 |
| 35 #endif // BatteryStatus_h |
| 36 |
OLD | NEW |