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

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: Point iFrame to production site. 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.cc ('k') | ash/system/chromeos/power/tray_power.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d79ac5e400df413d4d81b634cb580c0ee5dcde34 100644
--- a/ash/system/chromeos/power/tray_power.h
+++ b/ash/system/chromeos/power/tray_power.h
@@ -58,6 +58,17 @@ class ASH_EXPORT TrayPower : public SystemTrayItem,
private:
friend class TrayPowerTest;
+ // This enum is used for histogram. The existing values should not be removed,
+ // and the new values should be added just before CHARGER_TYPE_COUNT.
+ enum ChargerType{
+ UNKNOWN_CHARGER,
+ MAINS_CHARGER,
+ USB_CHARGER,
+ UNCONFIRMED_SPRING_CHARGER,
+ SAFE_SPRING_CHARGER,
+ CHARGER_TYPE_COUNT,
+ };
+
// Overridden from SystemTrayItem.
virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
@@ -82,6 +93,9 @@ class ASH_EXPORT TrayPower : public SystemTrayItem,
bool UpdateNotificationStateForRemainingTime();
bool UpdateNotificationStateForRemainingPercentage();
+ // Records the charger type in UMA.
+ void RecordChargerType();
+
message_center::MessageCenter* message_center_; // Not owned.
tray::PowerTrayView* power_tray_;
tray::PowerNotificationView* notification_view_;
@@ -91,6 +105,9 @@ class ASH_EXPORT TrayPower : public SystemTrayItem,
// called?
bool usb_charger_was_connected_;
+ // Was line power connected the last time onPowerStatusChanged() was called?
+ bool line_power_was_connected_;
+
DISALLOW_COPY_AND_ASSIGN(TrayPower);
};
« no previous file with comments | « ash/system/chromeos/power/power_status.cc ('k') | ash/system/chromeos/power/tray_power.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698