Chromium Code Reviews| Index: ui/app_list/app_list_folder_item.h |
| diff --git a/ui/app_list/app_list_folder_item.h b/ui/app_list/app_list_folder_item.h |
| index b04b77735ac9f67642b48e48aff879a7d5606ae6..61f9688f8db4b6b004ceee48cd6a71dda03e6db4 100644 |
| --- a/ui/app_list/app_list_folder_item.h |
| +++ b/ui/app_list/app_list_folder_item.h |
| @@ -12,11 +12,14 @@ |
| #include "ui/app_list/app_list_item.h" |
| #include "ui/app_list/app_list_item_list_observer.h" |
| #include "ui/app_list/app_list_item_observer.h" |
| +#include "ui/gfx/geometry/rect.h" |
| namespace app_list { |
| class AppListItemList; |
| +typedef std::vector<gfx::Rect> TopIconsBounds; |
|
xiyuan
2014/01/16 01:46:48
nit: TopIconsBounds -> Rects
jennyz
2014/01/16 17:49:52
Done.
|
| + |
| // AppListFolderItem implements the model/controller for folders. |
| class APP_LIST_EXPORT AppListFolderItem : public AppListItem, |
| public AppListItemListObserver, |
| @@ -28,10 +31,18 @@ class APP_LIST_EXPORT AppListFolderItem : public AppListItem, |
| // Updates the folder's icon. |
| void UpdateIcon(); |
| + // Returns the icon of one of the top items with |item_index|. |
| + const gfx::ImageSkia& GetTopIcon(size_t item_index); |
| + |
| AppListItemList* item_list() { return item_list_.get(); } |
| static const char kAppType[]; |
| + // Calculates the top item icons' bounds inside |folder_icon_bounds|. |
| + // Returns the bounds of top item icons in sequence of top left, top right, |
| + // bottom left, bottom right. |
| + static TopIconsBounds GetTopIconsBounds(const gfx::Rect& folder_icon_bounds); |
| + |
| private: |
| // AppListItem |
| virtual void Activate(int event_flags) OVERRIDE; |