| 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 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 window_->AddObserver(this); | 271 window_->AddObserver(this); |
| 272 layer_owner_->root()->GetCompositor()->AddObserver(this); | 272 layer_owner_->root()->GetCompositor()->AddObserver(this); |
| 273 } | 273 } |
| 274 ~CrossFadeObserver() override { | 274 ~CrossFadeObserver() override { |
| 275 window_->RemoveObserver(this); | 275 window_->RemoveObserver(this); |
| 276 window_ = NULL; | 276 window_ = NULL; |
| 277 layer_owner_->root()->GetCompositor()->RemoveObserver(this); | 277 layer_owner_->root()->GetCompositor()->RemoveObserver(this); |
| 278 } | 278 } |
| 279 | 279 |
| 280 // ui::CompositorObserver overrides: | 280 // ui::CompositorObserver overrides: |
| 281 void OnCompositingInitialized(ui::Compositor* compositor) override {} |
| 281 void OnCompositingDidCommit(ui::Compositor* compositor) override {} | 282 void OnCompositingDidCommit(ui::Compositor* compositor) override {} |
| 282 void OnCompositingStarted(ui::Compositor* compositor, | 283 void OnCompositingStarted(ui::Compositor* compositor, |
| 283 base::TimeTicks start_time) override {} | 284 base::TimeTicks start_time) override {} |
| 284 void OnCompositingEnded(ui::Compositor* compositor) override {} | 285 void OnCompositingEnded(ui::Compositor* compositor) override {} |
| 285 void OnCompositingAborted(ui::Compositor* compositor) override { | 286 void OnCompositingAborted(ui::Compositor* compositor) override { |
| 286 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. | 287 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. |
| 287 layer_owner_->root()->GetAnimator()->StopAnimating(); | 288 layer_owner_->root()->GetAnimator()->StopAnimating(); |
| 288 } | 289 } |
| 289 void OnCompositingLockStateChanged(ui::Compositor* compositor) override {} | 290 void OnCompositingLockStateChanged(ui::Compositor* compositor) override {} |
| 290 void OnCompositingShuttingDown(ui::Compositor* compositor) override {} | 291 void OnCompositingShuttingDown(ui::Compositor* compositor) override {} |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 gfx::Rect work_area = | 483 gfx::Rect work_area = |
| 483 display::Screen::GetScreen()->GetDisplayNearestWindow(window).work_area(); | 484 display::Screen::GetScreen()->GetDisplayNearestWindow(window).work_area(); |
| 484 int ltr_adjusted_x = base::i18n::IsRTL() ? work_area.right() : work_area.x(); | 485 int ltr_adjusted_x = base::i18n::IsRTL() ? work_area.right() : work_area.x(); |
| 485 return shelf->SelectValueForShelfAlignment( | 486 return shelf->SelectValueForShelfAlignment( |
| 486 gfx::Rect(ltr_adjusted_x, work_area.bottom(), 0, 0), | 487 gfx::Rect(ltr_adjusted_x, work_area.bottom(), 0, 0), |
| 487 gfx::Rect(work_area.x(), work_area.y(), 0, 0), | 488 gfx::Rect(work_area.x(), work_area.y(), 0, 0), |
| 488 gfx::Rect(work_area.right(), work_area.y(), 0, 0)); | 489 gfx::Rect(work_area.right(), work_area.y(), 0, 0)); |
| 489 } | 490 } |
| 490 | 491 |
| 491 } // namespace ash | 492 } // namespace ash |
| OLD | NEW |