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

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

Issue 2661023006: Remove unused references to NativeTheme in TrayPopupItemStyle. (Closed)
Patch Set: inline/share more Created 3 years, 10 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
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_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ 6 #define ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/system/chromeos/power/power_status.h" 9 #include "ash/common/system/chromeos/power/power_status.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "ui/views/view.h" 12 #include "ui/views/view.h"
13 13
14 namespace views { 14 namespace views {
15 class ImageView; 15 class ImageView;
16 class Label; 16 class Label;
17 } 17 }
18 18
19 namespace ash { 19 namespace ash {
20 20
21 class ASH_EXPORT PowerStatusView : public views::View, 21 class ASH_EXPORT PowerStatusView : public views::View,
22 public PowerStatus::Observer { 22 public PowerStatus::Observer {
23 public: 23 public:
24 explicit PowerStatusView(bool default_view_right_align); 24 explicit PowerStatusView(bool default_view_right_align);
25 ~PowerStatusView() override; 25 ~PowerStatusView() override;
26 26
27 // views::View: 27 // views::View:
28 void Layout() override; 28 void Layout() override;
29 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
30 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; 29 void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
31 30
32 // PowerStatus::Observer: 31 // PowerStatus::Observer:
33 void OnPowerStatusChanged() override; 32 void OnPowerStatusChanged() override;
34 33
35 private: 34 private:
36 friend class PowerStatusViewTest; 35 friend class PowerStatusViewTest;
37 36
38 void LayoutView(); 37 void LayoutView();
39 void UpdateText(); 38 void UpdateText();
40 void UpdateStyle(); 39 void UpdateStyle();
tdanderson 2017/02/01 23:01:52 I think you'd want to delete this too
Evan Stade 2017/02/02 22:49:53 Done.
41 40
42 // views::View: 41 // views::View:
43 void ChildPreferredSizeChanged(views::View* child) override; 42 void ChildPreferredSizeChanged(views::View* child) override;
44 43
45 // Layout default view UI items on the right side of system tray pop up item 44 // Layout default view UI items on the right side of system tray pop up item
46 // if true; otherwise, layout the UI items on the left side. 45 // if true; otherwise, layout the UI items on the left side.
47 bool default_view_right_align_; 46 bool default_view_right_align_;
48 47
49 views::Label* percentage_label_; 48 views::Label* percentage_label_;
50 views::Label* separator_label_; 49 views::Label* separator_label_;
51 views::Label* time_status_label_; 50 views::Label* time_status_label_;
52 51
53 // Battery status indicator icon. Unused in material design. 52 // Battery status indicator icon. Unused in material design.
54 views::ImageView* icon_; 53 views::ImageView* icon_;
55 54
56 // Information about the image last used to update |icon_|. Cached to avoid 55 // Information about the image last used to update |icon_|. Cached to avoid
57 // unnecessary updates (http://crbug.com/589348). 56 // unnecessary updates (http://crbug.com/589348).
58 PowerStatus::BatteryImageInfo previous_battery_image_info_; 57 PowerStatus::BatteryImageInfo previous_battery_image_info_;
59 58
60 // Only used in material design. 59 // Only used in material design.
61 base::string16 accessible_name_; 60 base::string16 accessible_name_;
62 61
63 DISALLOW_COPY_AND_ASSIGN(PowerStatusView); 62 DISALLOW_COPY_AND_ASSIGN(PowerStatusView);
64 }; 63 };
65 64
66 } // namespace ash 65 } // namespace ash
67 66
68 #endif // ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ 67 #endif // ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698