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

Unified Diff: base/power_monitor/power_monitor_device_source_android.cc

Issue 2351593004: Implement base::PowerMonitor::IsOnBatteryPower() for OSX. (Closed)
Patch Set: Invert setter. 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
Index: base/power_monitor/power_monitor_device_source_android.cc
diff --git a/base/power_monitor/power_monitor_device_source_android.cc b/base/power_monitor/power_monitor_device_source_android.cc
index c584a0c15b57f7b5e5a2a21a9baa0dce6e8ce3ef..fd5635c1913a663503c461ce9038e440a3ab71e8 100644
--- a/base/power_monitor/power_monitor_device_source_android.cc
+++ b/base/power_monitor/power_monitor_device_source_android.cc
@@ -18,7 +18,9 @@ void ProcessPowerEventHelper(PowerMonitorSource::PowerEvent event) {
namespace android {
-// Native implementation of PowerMonitor.java.
+// Native implementation of PowerMonitor.java. Note: This will be invoked by
+// PowerMonitor.java shortly after startup to set the correct initial value for
+// "is on battery power."
void OnBatteryChargingChanged(JNIEnv* env, const JavaParamRef<jclass>& clazz) {
ProcessPowerEventHelper(PowerMonitorSource::POWER_STATE_EVENT);
}

Powered by Google App Engine
This is Rietveld 408576698