OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/window_animations.h" | 5 #include "ash/wm/window_animations.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 window_->RemoveObserver(this); | 646 window_->RemoveObserver(this); |
647 window_ = NULL; | 647 window_ = NULL; |
648 layer_->GetCompositor()->RemoveObserver(this); | 648 layer_->GetCompositor()->RemoveObserver(this); |
649 wm::DeepDeleteLayers(layer_); | 649 wm::DeepDeleteLayers(layer_); |
650 layer_ = NULL; | 650 layer_ = NULL; |
651 } | 651 } |
652 | 652 |
653 // ui::CompositorObserver overrides: | 653 // ui::CompositorObserver overrides: |
654 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE { | 654 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE { |
655 } | 655 } |
656 virtual void OnCompositingWillStart(ui::Compositor* compositor) OVERRIDE { | |
657 } | |
658 virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE { | 656 virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE { |
659 } | 657 } |
660 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE { | 658 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE { |
661 } | 659 } |
662 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE { | 660 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE { |
663 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. | 661 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. |
664 layer_->GetAnimator()->StopAnimating(); | 662 layer_->GetAnimator()->StopAnimating(); |
665 } | 663 } |
| 664 virtual void OnCompositingLockStateChanged( |
| 665 ui::Compositor* compositor) OVERRIDE { |
| 666 } |
666 | 667 |
667 // aura::WindowObserver overrides: | 668 // aura::WindowObserver overrides: |
668 virtual void OnWindowDestroying(Window* window) OVERRIDE { | 669 virtual void OnWindowDestroying(Window* window) OVERRIDE { |
669 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. | 670 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. |
670 layer_->GetAnimator()->StopAnimating(); | 671 layer_->GetAnimator()->StopAnimating(); |
671 } | 672 } |
672 | 673 |
673 // ui::ImplicitAnimationObserver overrides: | 674 // ui::ImplicitAnimationObserver overrides: |
674 virtual void OnImplicitAnimationsCompleted() OVERRIDE { | 675 virtual void OnImplicitAnimationsCompleted() OVERRIDE { |
675 delete this; | 676 delete this; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 return AnimateShowWindow(window); | 877 return AnimateShowWindow(window); |
877 } else { | 878 } else { |
878 // Don't start hiding the window again if it's already being hidden. | 879 // Don't start hiding the window again if it's already being hidden. |
879 return window->layer()->GetTargetOpacity() != 0.0f && | 880 return window->layer()->GetTargetOpacity() != 0.0f && |
880 AnimateHideWindow(window); | 881 AnimateHideWindow(window); |
881 } | 882 } |
882 } | 883 } |
883 | 884 |
884 } // namespace internal | 885 } // namespace internal |
885 } // namespace ash | 886 } // namespace ash |
OLD | NEW |