| 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_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ | 5 #ifndef ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ |
| 6 #define ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ | 6 #define ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ |
| 7 | 7 |
| 8 #include "ash/system/tray/tray_views.h" | 8 #include "ash/system/tray/tray_views.h" |
| 9 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 class ImageView; | 12 class ImageView; |
| 13 class Label; | 13 class Label; |
| 14 class View; | 14 class View; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 | 18 |
| 19 class SystemTrayItem; | 19 class SystemTrayItem; |
| 20 | 20 |
| 21 namespace internal { | 21 namespace internal { |
| 22 | 22 |
| 23 // A view with a chevron ('>') on the right edge. Clicking on the view brings up | 23 // A view with a chevron ('>') on the right edge. Clicking on the view brings up |
| 24 // the detailed view of the tray-item that owns it. | 24 // the detailed view of the tray-item that owns it. |
| 25 class TrayItemMore : public ActionableView { | 25 class TrayItemMore : public ActionableView { |
| 26 public: | 26 public: |
| 27 TrayItemMore(SystemTrayItem* owner, bool show_more); | 27 TrayItemMore(SystemTrayItem* owner, bool show_more); |
| 28 virtual ~TrayItemMore(); | 28 virtual ~TrayItemMore(); |
| 29 | 29 |
| 30 SystemTrayItem* owner() const { return owner_; } |
| 31 |
| 30 void SetLabel(const string16& label); | 32 void SetLabel(const string16& label); |
| 31 void SetImage(const gfx::ImageSkia* image_skia); | 33 void SetImage(const gfx::ImageSkia* image_skia); |
| 32 void SetAccessibleName(const string16& name); | 34 void SetAccessibleName(const string16& name); |
| 33 | 35 |
| 34 protected: | 36 protected: |
| 35 // Replaces the default icon (on the left of the label), and allows a custom | 37 // 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| | 38 // view to be placed there. Once the default icon is replaced, |SetImage| |
| 37 // should never be called. | 39 // should never be called. |
| 38 void ReplaceIcon(views::View* view); | 40 void ReplaceIcon(views::View* view); |
| 39 | 41 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 53 views::ImageView* more_; | 55 views::ImageView* more_; |
| 54 string16 accessible_name_; | 56 string16 accessible_name_; |
| 55 | 57 |
| 56 DISALLOW_COPY_AND_ASSIGN(TrayItemMore); | 58 DISALLOW_COPY_AND_ASSIGN(TrayItemMore); |
| 57 }; | 59 }; |
| 58 | 60 |
| 59 } // namespace internal | 61 } // namespace internal |
| 60 } // namespace ash | 62 } // namespace ash |
| 61 | 63 |
| 62 #endif // ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ | 64 #endif // ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_ |
| OLD | NEW |