| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 } | 292 } |
| 293 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE { | 293 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE { |
| 294 } | 294 } |
| 295 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE { | 295 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE { |
| 296 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. | 296 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. |
| 297 layer_->GetAnimator()->StopAnimating(); | 297 layer_->GetAnimator()->StopAnimating(); |
| 298 } | 298 } |
| 299 virtual void OnCompositingLockStateChanged( | 299 virtual void OnCompositingLockStateChanged( |
| 300 ui::Compositor* compositor) OVERRIDE { | 300 ui::Compositor* compositor) OVERRIDE { |
| 301 } | 301 } |
| 302 virtual void OnReceivedLatencyInfo(ui::Compositor*, |
| 303 const WebKit::WebLatencyInfoImpl&) OVERRIDE { |
| 304 } |
| 302 | 305 |
| 303 // aura::WindowObserver overrides: | 306 // aura::WindowObserver overrides: |
| 304 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE { | 307 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE { |
| 305 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. | 308 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. |
| 306 layer_->GetAnimator()->StopAnimating(); | 309 layer_->GetAnimator()->StopAnimating(); |
| 307 } | 310 } |
| 308 | 311 |
| 309 // ui::ImplicitAnimationObserver overrides: | 312 // ui::ImplicitAnimationObserver overrides: |
| 310 virtual void OnImplicitAnimationsCompleted() OVERRIDE { | 313 virtual void OnImplicitAnimationsCompleted() OVERRIDE { |
| 311 delete this; | 314 delete this; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 type == LAYER_SCALE_ANIMATION_ABOVE ? kLayerScaleAboveSize : | 513 type == LAYER_SCALE_ANIMATION_ABOVE ? kLayerScaleAboveSize : |
| 511 kLayerScaleBelowSize; | 514 kLayerScaleBelowSize; |
| 512 gfx::Transform transform; | 515 gfx::Transform transform; |
| 513 transform.Translate(-layer->bounds().width() * (scale - 1.0f) / 2, | 516 transform.Translate(-layer->bounds().width() * (scale - 1.0f) / 2, |
| 514 -layer->bounds().height() * (scale - 1.0f) / 2); | 517 -layer->bounds().height() * (scale - 1.0f) / 2); |
| 515 transform.Scale(scale, scale); | 518 transform.Scale(scale, scale); |
| 516 layer->SetTransform(transform); | 519 layer->SetTransform(transform); |
| 517 } | 520 } |
| 518 | 521 |
| 519 } // namespace ash | 522 } // namespace ash |
| OLD | NEW |