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

Unified Diff: ui/app_list/app_list_folder_item.h

Issue 140203003: Implement animation UI for opening/closing an app list folder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address code review comments. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/app_list_constants.cc ('k') | ui/app_list/app_list_folder_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..debcc04db9022cc40507e880c9faee280571f639 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> Rects;
+
// 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 Rects GetTopIconsBounds(const gfx::Rect& folder_icon_bounds);
+
private:
// AppListItem
virtual void Activate(int event_flags) OVERRIDE;
« no previous file with comments | « ui/app_list/app_list_constants.cc ('k') | ui/app_list/app_list_folder_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698