diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-13 21:34:24 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-13 21:34:24 +0000 |
commit | d69a820b742aeeb6ba6d6521eb4d328b27ead35f (patch) | |
tree | 8b1b84f1eb0860e5825ff47c6dbe72f42b6ae2bb /ash/wm/app_list_controller.h | |
parent | bb7edffa557429eb8653f26458ec499621c76dc2 (diff) | |
download | chromium_src-d69a820b742aeeb6ba6d6521eb4d328b27ead35f.zip chromium_src-d69a820b742aeeb6ba6d6521eb4d328b27ead35f.tar.gz chromium_src-d69a820b742aeeb6ba6d6521eb4d328b27ead35f.tar.bz2 |
app_list: Update over-scroll animation.
- Remove over-scroll animation on app icons;
- Add an over-scroll animation on bubble widget itself by shifting 48px in the
scroll direction and snap back after over-scroll;
BUG=none.
TEST=Verify bubble moves with touch when over-scroll happens and snaps back afterwards.
R=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10915265
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/app_list_controller.h')
-rw-r--r-- | ash/wm/app_list_controller.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ash/wm/app_list_controller.h b/ash/wm/app_list_controller.h index a360c28..a841609 100644 --- a/ash/wm/app_list_controller.h +++ b/ash/wm/app_list_controller.h @@ -10,10 +10,12 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/timer.h" +#include "ui/app_list/pagination_model_observer.h" #include "ui/aura/event_filter.h" #include "ui/aura/focus_change_observer.h" #include "ui/aura/root_window_observer.h" #include "ui/compositor/layer_animation_observer.h" +#include "ui/gfx/rect.h" #include "ui/views/widget/widget_observer.h" namespace app_list { @@ -38,7 +40,8 @@ class AppListController : public aura::EventFilter, public ui::ImplicitAnimationObserver, public views::WidgetObserver, public ShellObserver, - public LauncherIconObserver { + public LauncherIconObserver, + public app_list::PaginationModelObserver { public: AppListController(); virtual ~AppListController(); @@ -104,6 +107,11 @@ class AppListController : public aura::EventFilter, // LauncherIconObserver overrides: virtual void OnLauncherIconPositionsChanged() OVERRIDE; + // app_list::PaginationModelObserver overrides: + virtual void TotalPagesChanged() OVERRIDE; + virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; + virtual void TransitionChanged() OVERRIDE; + scoped_ptr<app_list::PaginationModel> pagination_model_; // Whether we should show or hide app list widget. @@ -112,6 +120,12 @@ class AppListController : public aura::EventFilter, // The AppListView this class manages, owned by its widget. app_list::AppListView* view_; + // Cached bounds of |view_| for snapping back animation after over-scroll. + gfx::Rect view_bounds_; + + // Whether should schedule snap back animation. + bool should_snap_back_; + DISALLOW_COPY_AND_ASSIGN(AppListController); }; |