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

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

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble 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
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"
11 11
12 namespace views { 12 namespace views {
13 class ImageView; 13 class ImageView;
14 class Label; 14 class Label;
15 class View; 15 class View;
16 } 16 }
17 17
18 namespace ash { 18 namespace ash {
19 class SystemTrayItem; 19 class SystemTrayItem;
20 20
21 // A view with a chevron ('>') on the right edge. Clicking on the view brings up 21 // A view with a chevron ('>') on the right edge. Clicking on the view brings up
22 // the detailed view of the tray-item that owns it. 22 // the detailed view of the tray-item that owns it.
23 class TrayItemMore : public ActionableView { 23 class TrayItemMore : public ActionableView {
24 public: 24 public:
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_; }
29
30 void SetLabel(const base::string16& label); 28 void SetLabel(const base::string16& label);
31 void SetImage(const gfx::ImageSkia& image_skia); 29 void SetImage(const gfx::ImageSkia& image_skia);
32 void SetAccessibleName(const base::string16& name); 30 void SetAccessibleName(const base::string16& name);
33 31
34 private: 32 private:
35 // TODO(bruthig): Re-design to inform subclasses when the style changes while 33 // TODO(bruthig): Re-design to inform subclasses when the style changes while
36 // avoiding virtual function calls from the constructor. 34 // avoiding virtual function calls from the constructor.
37 void UpdateStyle(); 35 void UpdateStyle();
38 36
39 // Overridden from ActionableView. 37 // Overridden from ActionableView.
40 bool PerformAction(const ui::Event& event) override; 38 bool PerformAction(const ui::Event& event) override;
41 39
42 // Overridden from views::View. 40 // Overridden from views::View.
43 void Layout() override; 41 void Layout() override;
44 void GetAccessibleState(ui::AXViewState* state) override; 42 void GetAccessibleState(ui::AXViewState* state) override;
45 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; 43 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
46 44
47 SystemTrayItem* owner_;
48 // True if |more_| should be shown. 45 // True if |more_| should be shown.
49 bool show_more_; 46 bool show_more_;
50 views::ImageView* icon_; 47 views::ImageView* icon_;
51 views::Label* label_; 48 views::Label* label_;
52 views::ImageView* more_; 49 views::ImageView* more_;
53 base::string16 accessible_name_; 50 base::string16 accessible_name_;
54 51
55 DISALLOW_COPY_AND_ASSIGN(TrayItemMore); 52 DISALLOW_COPY_AND_ASSIGN(TrayItemMore);
56 }; 53 };
57 54
58 } // namespace ash 55 } // namespace ash
59 56
60 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ 57 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698