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

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

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 9 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/common/system/tray/tray_event_filter.cc ('k') | ash/common/system/tray/tray_image_item.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_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
7
8 #include "ash/ash_export.h"
9 #include "ash/common/system/tray/system_tray_item.h"
10 #include "base/macros.h"
11 #include "third_party/skia/include/core/SkColor.h"
12
13 namespace views {
14 class ImageView;
15 }
16
17 namespace gfx {
18 struct VectorIcon;
19 }
20
21 namespace ash {
22 class TrayItemView;
23
24 // A system tray item that uses an image as its "tray view" in the status area.
25 class ASH_EXPORT TrayImageItem : public SystemTrayItem {
26 public:
27 TrayImageItem(SystemTray* system_tray,
28 const gfx::VectorIcon& icon,
29 UmaType uma_type);
30 ~TrayImageItem() override;
31
32 views::View* tray_view();
33
34 protected:
35 virtual bool GetInitialVisibility() = 0;
36
37 // Overridden from SystemTrayItem.
38 views::View* CreateTrayView(LoginStatus status) override;
39 views::View* CreateDefaultView(LoginStatus status) override;
40 views::View* CreateDetailedView(LoginStatus status) override;
41 void DestroyTrayView() override;
42 void DestroyDefaultView() override;
43 void DestroyDetailedView() override;
44 void UpdateAfterLoginStatusChange(LoginStatus status) override;
45 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override;
46
47 // Sets the color of the icon to |color|.
48 void SetIconColor(SkColor color);
49
50 private:
51 // Sets the current icon on |tray_view_|'s ImageView.
52 void UpdateImageOnImageView();
53
54 // The icon and its current color.
55 const gfx::VectorIcon& icon_;
56 SkColor icon_color_;
57
58 // The image view in the tray.
59 TrayItemView* tray_view_;
60
61 DISALLOW_COPY_AND_ASSIGN(TrayImageItem);
62 };
63
64 } // namespace ash
65
66 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_event_filter.cc ('k') | ash/common/system/tray/tray_image_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698