Chromium Code Reviews| Index: ui/app_list/views/apps_grid_view.h |
| diff --git a/ui/app_list/views/apps_grid_view.h b/ui/app_list/views/apps_grid_view.h |
| index db094690610d6494e00e6d2799aac57a322ddc04..07d2619e22f6f15d574be112a4d61d2153d9f1e0 100644 |
| --- a/ui/app_list/views/apps_grid_view.h |
| +++ b/ui/app_list/views/apps_grid_view.h |
| @@ -15,6 +15,7 @@ |
| #include "ui/app_list/app_list_model_observer.h" |
| #include "ui/app_list/pagination_model_observer.h" |
| #include "ui/base/models/list_model_observer.h" |
| +#include "ui/compositor/layer_animation_observer.h" |
| #include "ui/views/animation/bounds_animator.h" |
| #include "ui/views/controls/button/button.h" |
| #include "ui/views/view.h" |
| @@ -55,7 +56,8 @@ class APP_LIST_EXPORT AppsGridView : public views::View, |
| public views::ButtonListener, |
| public AppListItemListObserver, |
| public PaginationModelObserver, |
| - public AppListModelObserver { |
| + public AppListModelObserver, |
| + public ui::ImplicitAnimationObserver { |
| public: |
| enum Pointer { |
| NONE, |
| @@ -138,6 +140,14 @@ class APP_LIST_EXPORT AppsGridView : public views::View, |
| // Stops the timer that triggers a page flip during a drag. |
| void StopPageFlipTimer(); |
| + // Returns the item view of the item at |index|. |
| + AppListItemView* GetItemViewAt(int index) const; |
| + |
| + // Show or hide the top item views. |
| + void ShowTopItemViews(bool show); |
|
xiyuan
2014/01/16 01:46:48
nit: ShowTopItemViews -> SetTopItemsVisible
jennyz
2014/01/16 17:49:52
Done.
|
| + |
| + void ScheduleAnimationToShow(bool show); |
| + |
| // Return the view model for test purposes. |
| const views::ViewModel* view_model_for_test() const { return &view_model_; } |
| @@ -151,6 +161,10 @@ class APP_LIST_EXPORT AppsGridView : public views::View, |
| void set_is_root_level(bool value) { is_root_level_ = value; } |
| + AppListItemView* activated_item_view() const { |
| + return activated_item_view_; |
| + } |
| + |
| private: |
| friend class test::AppsGridViewTestApi; |
| @@ -291,6 +305,9 @@ class APP_LIST_EXPORT AppsGridView : public views::View, |
| // Overridden from AppListModelObserver: |
| virtual void OnAppListModelStatusChanged() OVERRIDE; |
| + // ui::ImplicitAnimationObserver overrides: |
| + virtual void OnImplicitAnimationsCompleted() OVERRIDE; |
| + |
| // Hide a given view temporarily without losing (mouse) events and / or |
| // changing the size of it. If |immediate| is set the change will be |
| // immediately applied - otherwise it will change gradually. |
| @@ -413,6 +430,12 @@ class APP_LIST_EXPORT AppsGridView : public views::View, |
| // If true, AppsGridView is rending items at the root level of the app list. |
| bool is_root_level_; |
| + // The most recent activated item view. |
| + AppListItemView* activated_item_view_; |
| + |
| + // Animated to show or hide the view. |
| + bool animate_to_show_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(AppsGridView); |
| }; |