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

Unified Diff: ash/system/chromeos/power/power_status.cc

Issue 102373006: Merge 240486 "Implement the spring charger replacement UI and ad..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1650/src/
Patch Set: Created 7 years 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 | « ash/system/chromeos/power/power_status.h ('k') | ash/system/chromeos/power/tray_power.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/power/power_status.cc
===================================================================
--- ash/system/chromeos/power/power_status.cc (revision 240507)
+++ ash/system/chromeos/power/power_status.cc (working copy)
@@ -186,6 +186,16 @@
power_manager::PowerSupplyProperties_ExternalPower_USB;
}
+bool PowerStatus::IsOriginalSpringChargerConnected() const {
+ // Use the hard coded enum integer value for
+ // PowerSupplyProperties_ExternalPower_ORIGINAL_SPRING_CHARGER
+ // in purpose of backport compatibility.
+ // TODO(jennyz): change this to use
+ // PowerSupplyProperties_ExternalPower_ORIGINAL_SPRING_CHARGER on trunk
+ // after the change has been merged.
+ return proto_.external_power() == 3;
+}
+
gfx::ImageSkia PowerStatus::GetBatteryImage(IconSet icon_set) const {
gfx::Image all;
if (IsUsbChargerConnected()) {
« no previous file with comments | « ash/system/chromeos/power/power_status.h ('k') | ash/system/chromeos/power/tray_power.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698