OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_APP_LIST_VIEWS_ALL_APPS_TILE_ITEM_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_ALL_APPS_TILE_ITEM_VIEW_H_ |
6 #define UI_APP_LIST_VIEWS_ALL_APPS_TILE_ITEM_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_ALL_APPS_TILE_ITEM_VIEW_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
| 10 #include "ui/app_list/folder_image.h" |
10 #include "ui/app_list/views/tile_item_view.h" | 11 #include "ui/app_list/views/tile_item_view.h" |
11 | 12 |
12 namespace app_list { | 13 namespace app_list { |
13 | 14 |
| 15 class AppListItemList; |
14 class ContentsView; | 16 class ContentsView; |
15 | 17 |
16 // A tile item for the "All apps" button on the start page. | 18 // A tile item for the "All apps" button on the start page. |
17 class AllAppsTileItemView : public TileItemView { | 19 class AllAppsTileItemView : public TileItemView, public FolderImageObserver { |
18 public: | 20 public: |
19 AllAppsTileItemView(ContentsView* contents_view); | 21 AllAppsTileItemView(ContentsView* contents_view, AppListItemList* item_list); |
20 | 22 |
21 ~AllAppsTileItemView() override; | 23 ~AllAppsTileItemView() override; |
22 | 24 |
| 25 // Generates the folder's icon from the icons of the items in the item list. |
| 26 void UpdateIcon(); |
| 27 |
23 // TileItemView overrides: | 28 // TileItemView overrides: |
24 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 29 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
25 | 30 |
| 31 // FolderImageObserver overrides: |
| 32 void OnFolderImageUpdated() override; |
| 33 |
26 private: | 34 private: |
27 ContentsView* contents_view_; | 35 ContentsView* contents_view_; |
| 36 |
| 37 FolderImage folder_image_; |
28 }; | 38 }; |
29 | 39 |
30 } // namespace app_list | 40 } // namespace app_list |
31 | 41 |
32 #endif // UI_APP_LIST_VIEWS_ALL_APPS_TILE_ITEM_VIEW_H_ | 42 #endif // UI_APP_LIST_VIEWS_ALL_APPS_TILE_ITEM_VIEW_H_ |
OLD | NEW |