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

Side by Side Diff: ash/system/power/power_status_view.h

Issue 10907037: Only update system power indicators on change (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Last nits, and some SetImage() removal:wq Created 8 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/system/power/power_status_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_SYSTEM_POWER_POWER_STATUS_VIEW_H_ 5 #ifndef ASH_SYSTEM_POWER_POWER_STATUS_VIEW_H_
6 #define ASH_SYSTEM_POWER_POWER_STATUS_VIEW_H_ 6 #define ASH_SYSTEM_POWER_POWER_STATUS_VIEW_H_
7 7
8 #include "ash/system/power/power_supply_status.h" 8 #include "ash/system/power/power_supply_status.h"
9 #include "ui/views/view.h" 9 #include "ui/views/view.h"
10 10
(...skipping 29 matching lines...) Expand all
40 void UpdateTextForDefaultView(); 40 void UpdateTextForDefaultView();
41 void UpdateTextForNotificationView(); 41 void UpdateTextForNotificationView();
42 42
43 // Overridden from views::View. 43 // Overridden from views::View.
44 virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE; 44 virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
45 45
46 // Layout default view UI items on the right side of system tray pop up item 46 // Layout default view UI items on the right side of system tray pop up item
47 // if true; otherwise, layout the UI items on the left side. 47 // if true; otherwise, layout the UI items on the left side.
48 bool default_view_right_align_; 48 bool default_view_right_align_;
49 49
50 // labels used only for VIEW_NOTIFICATION. 50 // Labels used only for VIEW_NOTIFICATION.
51 views::Label* status_label_; 51 views::Label* status_label_;
52 views::Label* time_label_; 52 views::Label* time_label_;
53 53
54 // labels used only for VIEW_DEFAULT. 54 // Labels used only for VIEW_DEFAULT.
55 views::Label* time_status_label_; 55 views::Label* time_status_label_;
56 56
57 // Battery status indicator icon.
57 views::ImageView* icon_; 58 views::ImageView* icon_;
59
60 // Index of the current icon in the icon array image, or -1 if unknown.
61 int icon_image_index_;
62
58 ViewType view_type_; 63 ViewType view_type_;
59 64
60 PowerSupplyStatus supply_status_; 65 PowerSupplyStatus supply_status_;
61 66
62 DISALLOW_COPY_AND_ASSIGN(PowerStatusView); 67 DISALLOW_COPY_AND_ASSIGN(PowerStatusView);
63 }; 68 };
64 69
65 } // namespace internal 70 } // namespace internal
66 } // namespace ash 71 } // namespace ash
67 72
68 #endif // ASH_SYSTEM_POWER_POWER_STATUS_VIEW_H_ 73 #endif // ASH_SYSTEM_POWER_POWER_STATUS_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ash/system/power/power_status_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698