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

Unified Diff: ash/system/chromeos/power/tray_power.h

Issue 107103004: Implement the spring charger replacement UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add UMA stats. 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/tray_power.h
diff --git a/ash/system/chromeos/power/tray_power.h b/ash/system/chromeos/power/tray_power.h
index 9fb65b716918a092b20bf6d372d939f32b2b6114..472b6b660fe92f5a8ebf53dd5f507a5ff33dfdc6 100644
--- a/ash/system/chromeos/power/tray_power.h
+++ b/ash/system/chromeos/power/tray_power.h
@@ -58,6 +58,15 @@ class ASH_EXPORT TrayPower : public SystemTrayItem,
private:
friend class TrayPowerTest;
+ enum ExternalPowerSupply{
+ UNKNOWN_CHARGER,
+ MAINS_CHARGER,
+ USB_CHARGER,
+ ORIGINAL_SPRING_CHARGER,
Daniel Erat 2013/12/10 00:08:58 i think that the terminology here is getting confu
jennyz 2013/12/10 19:14:11 Done.
+ SAFE_SPRING_CHARGER,
+ NUM_EXTERNAL_POWER_SUPPLY,
xiyuan 2013/12/10 00:21:19 From what I learned from isherman@ on another CL,
jennyz 2013/12/10 19:14:11 The last enum value is already the count, renamed
+ };
+
// Overridden from SystemTrayItem.
virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
@@ -82,6 +91,9 @@ class ASH_EXPORT TrayPower : public SystemTrayItem,
bool UpdateNotificationStateForRemainingTime();
bool UpdateNotificationStateForRemainingPercentage();
+ // Records the external power supply type in UMA.
+ void RecordExternalPowerSupply();
Daniel Erat 2013/12/10 00:08:58 nit: rename to something like RecordChargerType()?
jennyz 2013/12/10 19:14:11 Done.
+
message_center::MessageCenter* message_center_; // Not owned.
tray::PowerTrayView* power_tray_;
tray::PowerNotificationView* notification_view_;
@@ -91,6 +103,8 @@ class ASH_EXPORT TrayPower : public SystemTrayItem,
// called?
bool usb_charger_was_connected_;
+ bool is_line_power_connected_;
Daniel Erat 2013/12/10 00:08:58 add a comment describing what this is and match th
jennyz 2013/12/10 19:14:11 Done.
+
DISALLOW_COPY_AND_ASSIGN(TrayPower);
};

Powered by Google App Engine
This is Rietveld 408576698