| 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 #ifndef BLINK_PLATFORM_BATTERY_BATTERY_STATUS_H_ | 5 #ifndef BLINK_MODULES_BATTERY_BATTERY_STATUS_H_ |
| 6 #define BLINK_PLATFORM_BATTERY_BATTERY_STATUS_H_ | 6 #define BLINK_MODULES_BATTERY_BATTERY_STATUS_H_ |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "modules/ModulesExport.h" |
| 9 #include "wtf/Assertions.h" | 9 #include "wtf/Assertions.h" |
| 10 | 10 |
| 11 #include <cmath> | 11 #include <cmath> |
| 12 #include <limits> | 12 #include <limits> |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 // Simple struct to hold the battery status. This class is copyable. | 16 // Simple struct to hold the battery status. This class is copyable. |
| 17 class PLATFORM_EXPORT BatteryStatus final { | 17 class MODULES_EXPORT BatteryStatus final { |
| 18 public: | 18 public: |
| 19 BatteryStatus() | 19 BatteryStatus() |
| 20 : charging_(true), | 20 : charging_(true), |
| 21 charging_time_(0), | 21 charging_time_(0), |
| 22 discharging_time_(std::numeric_limits<double>::infinity()), | 22 discharging_time_(std::numeric_limits<double>::infinity()), |
| 23 level_(1) {} | 23 level_(1) {} |
| 24 BatteryStatus(bool charging, | 24 BatteryStatus(bool charging, |
| 25 double charging_time, | 25 double charging_time, |
| 26 double discharging_time, | 26 double discharging_time, |
| 27 double level) | 27 double level) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool charging_; | 52 bool charging_; |
| 53 double charging_time_; | 53 double charging_time_; |
| 54 double discharging_time_; | 54 double discharging_time_; |
| 55 double level_; | 55 double level_; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace blink | 58 } // namespace blink |
| 59 | 59 |
| 60 #endif // BLINK_PLATFORM_BATTERY_BATTERY_STATUS_H_ | 60 #endif // BLINK_MODULES_BATTERY_BATTERY_STATUS_H_ |
| OLD | NEW |