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

Side by Side Diff: ash/common/system/tray/tray_item_more.h

Issue 2244003002: Materialized font style for TrayItemMore type system tray rows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-ordered static function in Label. Created 4 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 | « ash/BUILD.gn ('k') | ash/common/system/tray/tray_item_more.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_COMMON_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
7 7
8 #include "ash/common/system/tray/actionable_view.h" 8 #include "ash/common/system/tray/actionable_view.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 14 matching lines...) Expand all
25 TrayItemMore(SystemTrayItem* owner, bool show_more); 25 TrayItemMore(SystemTrayItem* owner, bool show_more);
26 ~TrayItemMore() override; 26 ~TrayItemMore() override;
27 27
28 SystemTrayItem* owner() const { return owner_; } 28 SystemTrayItem* owner() const { return owner_; }
29 29
30 void SetLabel(const base::string16& label); 30 void SetLabel(const base::string16& label);
31 void SetImage(const gfx::ImageSkia& image_skia); 31 void SetImage(const gfx::ImageSkia& image_skia);
32 void SetAccessibleName(const base::string16& name); 32 void SetAccessibleName(const base::string16& name);
33 33
34 private: 34 private:
35 // TODO(bruthig): Re-design to inform subclasses when the style changes while
36 // avoiding virtual function calls from the constructor.
37 void UpdateStyle();
38
35 // Overridden from ActionableView. 39 // Overridden from ActionableView.
36 bool PerformAction(const ui::Event& event) override; 40 bool PerformAction(const ui::Event& event) override;
37 41
38 // Overridden from views::View. 42 // Overridden from views::View.
39 void Layout() override; 43 void Layout() override;
40 void GetAccessibleState(ui::AXViewState* state) override; 44 void GetAccessibleState(ui::AXViewState* state) override;
45 void ViewHierarchyChanged(
46 const ViewHierarchyChangedDetails& details) override;
47 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
41 48
42 SystemTrayItem* owner_; 49 SystemTrayItem* owner_;
43 // True if |more_| should be shown. 50 // True if |more_| should be shown.
44 bool show_more_; 51 bool show_more_;
45 views::ImageView* icon_; 52 views::ImageView* icon_;
46 views::Label* label_; 53 views::Label* label_;
47 views::ImageView* more_; 54 views::ImageView* more_;
48 base::string16 accessible_name_; 55 base::string16 accessible_name_;
49 56
50 DISALLOW_COPY_AND_ASSIGN(TrayItemMore); 57 DISALLOW_COPY_AND_ASSIGN(TrayItemMore);
51 }; 58 };
52 59
53 } // namespace ash 60 } // namespace ash
54 61
55 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ 62 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
OLDNEW
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/system/tray/tray_item_more.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698