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

Unified Diff: ash/app_list/app_list.cc

Issue 9222018: reland -- Disable animations during aura tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « ash/app_list/app_list.h ('k') | ash/drag_drop/drag_drop_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/app_list/app_list.cc
diff --git a/ash/app_list/app_list.cc b/ash/app_list/app_list.cc
index c439bbbe8e6a2e0034b16afa1e93e439f1bac038..ad9fd017e1a253a5d16543d8680f5f461e731c30 100644
--- a/ash/app_list/app_list.cc
+++ b/ash/app_list/app_list.cc
@@ -87,7 +87,6 @@ void AppList::SetWidget(views::Widget* widget) {
if (is_visible_) {
widget_ = widget;
- widget_->AddObserver(this);
GetLayer(widget_)->GetAnimator()->AddObserver(this);
Shell::GetInstance()->AddRootWindowEventFilter(this);
@@ -119,13 +118,19 @@ void AppList::ScheduleAnimation() {
return;
ui::Layer* layer = GetLayer(widget_);
+
+ // Stop observing previous animation.
+ StopObservingImplicitAnimations();
+
ui::ScopedLayerAnimationSettings app_list_animation(layer->GetAnimator());
+ app_list_animation.AddObserver(this);
layer->SetBounds(GetPreferredBounds(is_visible_));
layer->SetOpacity(is_visible_ ? 1.0 : 0.0);
ui::Layer* default_container_layer = default_container->layer();
ui::ScopedLayerAnimationSettings default_container_animation(
default_container_layer->GetAnimator());
+ app_list_animation.AddObserver(this);
default_container_layer->SetOpacity(is_visible_ ? 0.0 : 1.0);
}
@@ -159,22 +164,13 @@ ui::GestureStatus AppList::PreHandleGestureEvent(
}
////////////////////////////////////////////////////////////////////////////////
-// AppList, ui::LayerAnimationObserver implementation:
+// AppList, ui::ImplicitAnimationObserver implementation:
-void AppList::OnLayerAnimationEnded(
- const ui::LayerAnimationSequence* sequence) {
+void AppList::OnImplicitAnimationsCompleted() {
if (!is_visible_ )
widget_->Close();
}
-void AppList::OnLayerAnimationAborted(
- const ui::LayerAnimationSequence* sequence) {
-}
-
-void AppList::OnLayerAnimationScheduled(
- const ui::LayerAnimationSequence* sequence) {
-}
-
////////////////////////////////////////////////////////////////////////////////
// AppList, views::Widget::Observer implementation:
« no previous file with comments | « ash/app_list/app_list.h ('k') | ash/drag_drop/drag_drop_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698