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
3 // found in the LICENSE file.
5 #ifndef ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
6 #define ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
8 #include "ash/system/tray/actionable_view.h"
9 #include "ui/views/view.h"
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.
25 class TrayItemMore : public ActionableView {
27 TrayItemMore(SystemTrayItem* owner, bool show_more);
28 virtual ~TrayItemMore();
30 SystemTrayItem* owner() const { return owner_; }
32 void SetLabel(const base::string16& label);
33 void SetImage(const gfx::ImageSkia* image_skia);
34 void SetAccessibleName(const base::string16& name);
37 // Replaces the default icon (on the left of the label), and allows a custom
38 // view to be placed there. Once the default icon is replaced, |SetImage|
39 // should never be called.
40 void ReplaceIcon(views::View* view);
43 // Overridden from ActionableView.
44 virtual bool PerformAction(const ui::Event& event) OVERRIDE;
46 // Overridden from views::View.
47 virtual void Layout() OVERRIDE;
48 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
50 SystemTrayItem* owner_;
51 // True if |more_| should be shown.
53 views::ImageView* icon_;
55 views::ImageView* more_;
56 base::string16 accessible_name_;
58 DISALLOW_COPY_AND_ASSIGN(TrayItemMore);
61 } // namespace internal
64 #endif // ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_