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

Side by Side Diff: ui/app_list/views/tile_item_view.h

Issue 297643002: Add tiles to the experimental app list start page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments, add model observer and tests Created 6 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 | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698