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

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

Issue 1014753003: Move low battery notification to Message Center. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: ash/system/chromeos/power/power_status_view.h
diff --git a/ash/system/chromeos/power/power_status_view.h b/ash/system/chromeos/power/power_status_view.h
index 01263037898b960cf9591933f17746810c60380e..a24ecc8c90974c012e499509a124ab915de37e65 100644
--- a/ash/system/chromeos/power/power_status_view.h
+++ b/ash/system/chromeos/power/power_status_view.h
@@ -19,12 +19,7 @@ namespace ash {
class ASH_EXPORT PowerStatusView : public views::View,
public PowerStatus::Observer {
public:
- enum ViewType {
- VIEW_DEFAULT,
- VIEW_NOTIFICATION
- };
-
- PowerStatusView(ViewType view_type, bool default_view_right_align);
+ PowerStatusView(bool default_view_right_align);
~PowerStatusView() override;
// Overridden from views::View.
@@ -36,13 +31,10 @@ class ASH_EXPORT PowerStatusView : public views::View,
void OnPowerStatusChanged() override;
private:
- friend class PowerStatusDefaultViewTest;
- friend class PowerStatusNotificationViewTest;
+ friend class PowerStatusViewTest;
- void LayoutDefaultView();
- void LayoutNotificationView();
- void UpdateTextForDefaultView();
- void UpdateTextForNotificationView();
+ void LayoutView();
+ void UpdateText();
// Overridden from views::View.
void ChildPreferredSizeChanged(views::View* child) override;
@@ -51,19 +43,12 @@ class ASH_EXPORT PowerStatusView : public views::View,
// if true; otherwise, layout the UI items on the left side.
bool default_view_right_align_;
- // Labels used only for VIEW_NOTIFICATION.
- views::Label* status_label_;
- views::Label* time_label_;
-
- // Labels used only for VIEW_DEFAULT.
views::Label* time_status_label_;
views::Label* percentage_label_;
// Battery status indicator icon.
views::ImageView* icon_;
- ViewType view_type_;
-
DISALLOW_COPY_AND_ASSIGN(PowerStatusView);
};

Powered by Google App Engine
This is Rietveld 408576698