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

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

Issue 682843004: Experimental app list: "All apps" button has a folder-like icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ares-allapps-button
Patch Set: Created 6 years, 1 month 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
OLDNEW
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, FolderImageObserver {
calamity 2014/10/28 05:12:58 Default inheritance? Intentional?
Matt Giuca 2014/10/29 07:11:23 No. Thanks.
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 protected:
32 // FolderImageObserver overrides:
33 void OnFolderImageUpdated(const gfx::ImageSkia& icon) override;
34
26 private: 35 private:
27 ContentsView* contents_view_; 36 ContentsView* contents_view_;
37
38 FolderImage folder_image_;
28 }; 39 };
29 40
30 } // namespace app_list 41 } // namespace app_list
31 42
32 #endif // UI_APP_LIST_VIEWS_ALL_APPS_TILE_ITEM_VIEW_H_ 43 #endif // UI_APP_LIST_VIEWS_ALL_APPS_TILE_ITEM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698