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

Unified Diff: ash/wm/system_modal_container_layout_manager.cc

Issue 9320018: Revert 120092 - Reland 120074 -- 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
Index: ash/wm/system_modal_container_layout_manager.cc
===================================================================
--- ash/wm/system_modal_container_layout_manager.cc (revision 120096)
+++ ash/wm/system_modal_container_layout_manager.cc (working copy)
@@ -122,14 +122,22 @@
}
////////////////////////////////////////////////////////////////////////////////
-// SystemModalContainerLayoutManager,
-// ui::ImplicitAnimationObserver implementation:
+// SystemModalContainerLayoutManager, ui::LayerAnimationObserver implementation:
-void SystemModalContainerLayoutManager::OnImplicitAnimationsCompleted() {
+void SystemModalContainerLayoutManager::OnLayerAnimationEnded(
+ const ui::LayerAnimationSequence* sequence) {
if (modal_screen_ && !modal_screen_->GetNativeView()->layer()->ShouldDraw())
DestroyModalScreen();
}
+void SystemModalContainerLayoutManager::OnLayerAnimationAborted(
+ const ui::LayerAnimationSequence* sequence) {
+}
+
+void SystemModalContainerLayoutManager::OnLayerAnimationScheduled(
+ const ui::LayerAnimationSequence* sequence) {
+}
+
////////////////////////////////////////////////////////////////////////////////
// SystemModalContainerLayoutManager,
// SystemModalContainerEventFilter::Delegate implementation:
@@ -178,33 +186,27 @@
"SystemModalContainerLayoutManager.ModalScreen");
modal_screen_->SetContentsView(new ScreenView);
modal_screen_->GetNativeView()->layer()->SetOpacity(0.0f);
+ modal_screen_->GetNativeView()->layer()->GetAnimator()->AddObserver(this);
Shell::GetInstance()->AddRootWindowEventFilter(modality_filter_.get());
- StopObservingImplicitAnimations();
-
ui::ScopedLayerAnimationSettings settings(
modal_screen_->GetNativeView()->layer()->GetAnimator());
- settings.AddObserver(this);
modal_screen_->Show();
modal_screen_->GetNativeView()->layer()->SetOpacity(0.5f);
container_->StackChildAtTop(modal_screen_->GetNativeView());
}
void SystemModalContainerLayoutManager::DestroyModalScreen() {
- // Stop observing the modal screen's animations.
- StopObservingImplicitAnimations();
+ modal_screen_->GetNativeView()->layer()->GetAnimator()->RemoveObserver(this);
modal_screen_->Close();
modal_screen_ = NULL;
}
void SystemModalContainerLayoutManager::HideModalScreen() {
- StopObservingImplicitAnimations();
-
Shell::GetInstance()->RemoveRootWindowEventFilter(modality_filter_.get());
ui::ScopedLayerAnimationSettings settings(
modal_screen_->GetNativeView()->layer()->GetAnimator());
- settings.AddObserver(this);
modal_screen_->GetNativeView()->layer()->SetOpacity(0.0f);
}
« no previous file with comments | « ash/wm/system_modal_container_layout_manager.h ('k') | ash/wm/system_modal_container_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698