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

Unified Diff: ui/app_list/views/apps_grid_view.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/views/apps_container_view.cc ('k') | ui/app_list/views/apps_grid_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3958d67e4ac4edeae84357c95379d6808537021d 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,15 @@ 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 SetTopItemViewsVisible(bool visible);
+
+ // Schedules an animation to show or hide the view.
+ void ScheduleShowHideAnimation(bool show);
+
// Return the view model for test purposes.
const views::ViewModel* view_model_for_test() const { return &view_model_; }
@@ -151,6 +162,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 +306,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 +431,9 @@ 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_;
+
DISALLOW_COPY_AND_ASSIGN(AppsGridView);
};
« no previous file with comments | « ui/app_list/views/apps_container_view.cc ('k') | ui/app_list/views/apps_grid_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698