OLD | NEW |
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 10 matching lines...) Expand all Loading... |
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_; } | 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 protected: | 34 protected: |
35 // Replaces the default icon (on the left of the label), and allows a custom | 35 // Replaces the default icon (on the left of the label), and allows a custom |
36 // view to be placed there. Once the default icon is replaced, |SetImage| | 36 // view to be placed there. Once the default icon is replaced, |SetImage| |
37 // should never be called. | 37 // should never be called. |
38 void ReplaceIcon(views::View* view); | 38 void ReplaceIcon(views::View* view); |
39 | 39 |
40 private: | 40 private: |
41 // Overridden from ActionableView. | 41 // Overridden from ActionableView. |
(...skipping 10 matching lines...) Expand all Loading... |
52 views::Label* label_; | 52 views::Label* label_; |
53 views::ImageView* more_; | 53 views::ImageView* more_; |
54 base::string16 accessible_name_; | 54 base::string16 accessible_name_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(TrayItemMore); | 56 DISALLOW_COPY_AND_ASSIGN(TrayItemMore); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace ash | 59 } // namespace ash |
60 | 60 |
61 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ | 61 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ |
OLD | NEW |