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

Unified Diff: base/power_monitor/power_monitor_device_source.h

Issue 2379133002: Merge M54: "Implement base::PowerMonitor::IsOnBatteryPower() for OSX." (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/BUILD.gn ('k') | base/power_monitor/power_monitor_device_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/power_monitor/power_monitor_device_source.h
diff --git a/base/power_monitor/power_monitor_device_source.h b/base/power_monitor/power_monitor_device_source.h
index 2dabac8865ed49c81d98e34f6b58a920667d962e..69237cd643413d14b2d2f14a099607d29bd94063 100644
--- a/base/power_monitor/power_monitor_device_source.h
+++ b/base/power_monitor/power_monitor_device_source.h
@@ -15,18 +15,8 @@
#if defined(OS_WIN)
#include <windows.h>
-
-// Windows HiRes timers drain the battery faster so we need to know the battery
-// status. This isn't true for other platforms.
-#define ENABLE_BATTERY_MONITORING 1
-#else
-#undef ENABLE_BATTERY_MONITORING
#endif // !OS_WIN
-#if defined(ENABLE_BATTERY_MONITORING)
-#include "base/timer/timer.h"
-#endif // defined(ENABLE_BATTERY_MONITORING)
-
#if defined(OS_IOS)
#include <objc/runtime.h>
#endif // OS_IOS
@@ -93,19 +83,11 @@ class BASE_EXPORT PowerMonitorDeviceSource : public PowerMonitorSource {
// false otherwise.
bool IsOnBatteryPowerImpl() override;
- // Checks the battery status and notifies observers if the battery
- // status has changed.
- void BatteryCheck();
-
#if defined(OS_IOS)
// Holds pointers to system event notification observers.
std::vector<id> notification_observers_;
#endif
-#if defined(ENABLE_BATTERY_MONITORING)
- base::OneShotTimer delayed_battery_check_;
-#endif
-
#if defined(OS_WIN)
PowerMessageWindow power_message_window_;
#endif
« no previous file with comments | « base/BUILD.gn ('k') | base/power_monitor/power_monitor_device_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698