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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 window_->RemoveObserver(this); | 566 window_->RemoveObserver(this); |
567 window_ = NULL; | 567 window_ = NULL; |
568 layer_->GetCompositor()->RemoveObserver(this); | 568 layer_->GetCompositor()->RemoveObserver(this); |
569 wm::DeepDeleteLayers(layer_); | 569 wm::DeepDeleteLayers(layer_); |
570 layer_ = NULL; | 570 layer_ = NULL; |
571 } | 571 } |
572 | 572 |
573 // ui::CompositorObserver overrides: | 573 // ui::CompositorObserver overrides: |
574 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE { | 574 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE { |
575 } | 575 } |
576 virtual void OnCompositingWillStart(ui::Compositor* compositor) OVERRIDE { | |
577 } | |
578 virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE { | 576 virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE { |
579 } | 577 } |
580 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE { | 578 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE { |
581 } | 579 } |
582 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE { | 580 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE { |
583 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. | 581 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. |
584 layer_->GetAnimator()->StopAnimating(); | 582 layer_->GetAnimator()->StopAnimating(); |
585 } | 583 } |
| 584 virtual void OnCompositingLockStateChanged( |
| 585 ui::Compositor* compositor) OVERRIDE { |
| 586 } |
586 | 587 |
587 // aura::WindowObserver overrides: | 588 // aura::WindowObserver overrides: |
588 virtual void OnWindowDestroying(Window* window) OVERRIDE { | 589 virtual void OnWindowDestroying(Window* window) OVERRIDE { |
589 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. | 590 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. |
590 layer_->GetAnimator()->StopAnimating(); | 591 layer_->GetAnimator()->StopAnimating(); |
591 } | 592 } |
592 | 593 |
593 // ui::ImplicitAnimationObserver overrides: | 594 // ui::ImplicitAnimationObserver overrides: |
594 virtual void OnImplicitAnimationsCompleted() OVERRIDE { | 595 virtual void OnImplicitAnimationsCompleted() OVERRIDE { |
595 delete this; | 596 delete this; |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 return AnimateShowWindow(window); | 795 return AnimateShowWindow(window); |
795 } else { | 796 } else { |
796 // Don't start hiding the window again if it's already being hidden. | 797 // Don't start hiding the window again if it's already being hidden. |
797 return window->layer()->GetTargetOpacity() != 0.0f && | 798 return window->layer()->GetTargetOpacity() != 0.0f && |
798 AnimateHideWindow(window); | 799 AnimateHideWindow(window); |
799 } | 800 } |
800 } | 801 } |
801 | 802 |
802 } // namespace internal | 803 } // namespace internal |
803 } // namespace ash | 804 } // namespace ash |
OLD | NEW |