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

Side by Side Diff: third_party/WebKit/Source/modules/battery/battery_status.h

Issue 1835873002: Removes BatteryDispatcherProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes export settings again. Created 4 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
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/battery/DEPS ('k') | third_party/WebKit/Source/modules/battery/testing/InternalsBattery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698