OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 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 UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_ | |
6 #define UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_ | |
7 | |
8 #include "ui/views/controls/button/button.h" | |
9 #include "ui/views/controls/button/custom_button.h" | |
10 | |
11 namespace { | |
12 class TileItemBackground; | |
13 } | |
14 | |
15 namespace views { | |
16 class ImageView; | |
17 class Label; | |
18 } | |
19 | |
20 namespace app_list { | |
21 | |
22 class AppListItem; | |
23 | |
24 // The view for a tile in the app list on the start/search page. | |
25 class TileItemView : public views::CustomButton, public views::ButtonListener { | |
26 public: | |
27 TileItemView(); | |
28 virtual ~TileItemView(); | |
29 | |
30 void SetAppListItem(AppListItem* item); | |
31 | |
32 private: | |
33 // Overridden from views::View: | |
34 virtual gfx::Size GetPreferredSize() OVERRIDE; | |
35 | |
36 // Overridden from views::ButtonListener: | |
37 virtual void ButtonPressed(views::Button* sender, | |
38 const ui::Event& event) OVERRIDE; | |
39 | |
40 // Owned by the model provided by the AppListViewDelegate. | |
41 AppListItem* item_; | |
42 | |
43 views::ImageView* icon_; // Owned by views hierarchy. | |
44 views::Label* title_; // Owned by views hierarchy. | |
45 | |
46 TileItemBackground* background_; | |
47 }; | |
tapted
2014/05/27 05:10:10
nit: DISALLOW_COPY_AND_ASSIGN
calamity
2014/05/27 06:21:08
Done.
| |
48 | |
49 } // namespace app_list | |
50 | |
51 #endif // UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_ | |
OLD | NEW |