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

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

Issue 2774093002: Change PowerStatus::GetBatteryImage to not use ExtractImageRep and scale (Closed)
Patch Set: powericon: removedeadunittestcode Created 3 years, 8 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;
16 class Label; 15 class Label;
17 } 16 }
18 17
19 namespace ash { 18 namespace ash {
20 19
21 class ASH_EXPORT PowerStatusView : public views::View, 20 class ASH_EXPORT PowerStatusView : public views::View,
22 public PowerStatus::Observer { 21 public PowerStatus::Observer {
23 public: 22 public:
24 explicit PowerStatusView(bool default_view_right_align); 23 explicit PowerStatusView(bool default_view_right_align);
25 ~PowerStatusView() override; 24 ~PowerStatusView() override;
(...skipping 15 matching lines...) Expand all
41 void ChildPreferredSizeChanged(views::View* child) override; 40 void ChildPreferredSizeChanged(views::View* child) override;
42 41
43 // Layout default view UI items on the right side of system tray pop up item 42 // Layout default view UI items on the right side of system tray pop up item
44 // if true; otherwise, layout the UI items on the left side. 43 // if true; otherwise, layout the UI items on the left side.
45 bool default_view_right_align_; 44 bool default_view_right_align_;
46 45
47 views::Label* percentage_label_; 46 views::Label* percentage_label_;
48 views::Label* separator_label_; 47 views::Label* separator_label_;
49 views::Label* time_status_label_; 48 views::Label* time_status_label_;
50 49
51 // Battery status indicator icon. Unused in material design.
52 views::ImageView* icon_;
53
54 // Information about the image last used to update |icon_|. Cached to avoid
55 // unnecessary updates (http://crbug.com/589348).
56 PowerStatus::BatteryImageInfo previous_battery_image_info_;
57
58 // Only used in material design. 50 // Only used in material design.
59 base::string16 accessible_name_; 51 base::string16 accessible_name_;
60 52
61 DISALLOW_COPY_AND_ASSIGN(PowerStatusView); 53 DISALLOW_COPY_AND_ASSIGN(PowerStatusView);
62 }; 54 };
63 55
64 } // namespace ash 56 } // namespace ash
65 57
66 #endif // ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ 58 #endif // ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/power/power_status_unittest.cc ('k') | ash/common/system/chromeos/power/power_status_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698