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

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

Issue 107103004: Implement the spring charger replacement UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. 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
Index: ash/system/chromeos/power/power_status.cc
diff --git a/ash/system/chromeos/power/power_status.cc b/ash/system/chromeos/power/power_status.cc
index 6b05401891118bd8cf960948af14c78a5d5d37fc..6f4cfe6a4b8a1776d74a33c76edbd706eac4e1b1 100644
--- a/ash/system/chromeos/power/power_status.cc
+++ b/ash/system/chromeos/power/power_status.cc
@@ -188,6 +188,13 @@ bool PowerStatus::IsUsbChargerConnected() const {
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.
Daniel Erat 2013/12/06 17:43:26 nit: add a TODO to change this to PowerSupplyPrope
jennyz 2013/12/06 18:15:16 Done.
+ return proto_.external_power() == 3;
+}
+
gfx::ImageSkia PowerStatus::GetBatteryImage(IconSet icon_set) const {
gfx::Image all;
if (IsUsbChargerConnected()) {

Powered by Google App Engine
This is Rietveld 408576698