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

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

Issue 2066583004: mash: Move most files in //ash/system/tray to //ash/common/system/tray (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trayupdatemove
Patch Set: rebase Created 4 years, 6 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/system/tray/tray_empty.cc ('k') | ash/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
(Empty)
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.
4
5 #ifndef ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
6 #define ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
7
8 #include "ash/system/tray/actionable_view.h"
9 #include "base/macros.h"
10 #include "ui/views/view.h"
11
12 namespace views {
13 class ImageView;
14 class Label;
15 class View;
16 }
17
18 namespace ash {
19 class SystemTrayItem;
20
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.
23 class TrayItemMore : public ActionableView {
24 public:
25 TrayItemMore(SystemTrayItem* owner, bool show_more);
26 ~TrayItemMore() override;
27
28 SystemTrayItem* owner() const { return owner_; }
29
30 void SetLabel(const base::string16& label);
31 void SetImage(const gfx::ImageSkia* image_skia);
32 void SetAccessibleName(const base::string16& name);
33
34 protected:
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|
37 // should never be called.
38 void ReplaceIcon(views::View* view);
39
40 private:
41 // Overridden from ActionableView.
42 bool PerformAction(const ui::Event& event) override;
43
44 // Overridden from views::View.
45 void Layout() override;
46 void GetAccessibleState(ui::AXViewState* state) override;
47
48 SystemTrayItem* owner_;
49 // True if |more_| should be shown.
50 bool show_more_;
51 views::ImageView* icon_;
52 views::Label* label_;
53 views::ImageView* more_;
54 base::string16 accessible_name_;
55
56 DISALLOW_COPY_AND_ASSIGN(TrayItemMore);
57 };
58
59 } // namespace ash
60
61 #endif // ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
OLDNEW
« no previous file with comments | « ash/system/tray/tray_empty.cc ('k') | ash/system/tray/tray_item_more.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698