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