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/magnifier/magnification_controller.h" | 5 #include "ash/magnifier/magnification_controller.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "ash/accelerators/accelerator_controller.h" | 10 #include "ash/accelerators/accelerator_controller.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 settings.SetPreemptionStrategy( | 372 settings.SetPreemptionStrategy( |
373 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 373 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
374 settings.SetTweenType(tween_type); | 374 settings.SetTweenType(tween_type); |
375 settings.SetTransitionDuration( | 375 settings.SetTransitionDuration( |
376 base::TimeDelta::FromMilliseconds(duration_in_ms)); | 376 base::TimeDelta::FromMilliseconds(duration_in_ms)); |
377 | 377 |
378 display::Display display = | 378 display::Display display = |
379 display::Screen::GetScreen()->GetDisplayNearestWindow(root_window_); | 379 display::Screen::GetScreen()->GetDisplayNearestWindow(root_window_); |
380 std::unique_ptr<RootWindowTransformer> transformer( | 380 std::unique_ptr<RootWindowTransformer> transformer( |
381 CreateRootWindowTransformerForDisplay(root_window_, display)); | 381 CreateRootWindowTransformerForDisplay(root_window_, display)); |
382 GetRootWindowController(root_window_) | 382 RootWindowController::ForWindow(root_window_) |
383 ->ash_host() | 383 ->ash_host() |
384 ->SetRootWindowTransformer(std::move(transformer)); | 384 ->SetRootWindowTransformer(std::move(transformer)); |
385 | 385 |
386 if (duration_in_ms > 0) | 386 if (duration_in_ms > 0) |
387 is_on_animation_ = true; | 387 is_on_animation_ = true; |
388 | 388 |
389 return true; | 389 return true; |
390 } | 390 } |
391 | 391 |
392 void MagnificationControllerImpl::StartOrStopScrollIfNecessary() { | 392 void MagnificationControllerImpl::StartOrStopScrollIfNecessary() { |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 | 894 |
895 //////////////////////////////////////////////////////////////////////////////// | 895 //////////////////////////////////////////////////////////////////////////////// |
896 // MagnificationController: | 896 // MagnificationController: |
897 | 897 |
898 // static | 898 // static |
899 MagnificationController* MagnificationController::CreateInstance() { | 899 MagnificationController* MagnificationController::CreateInstance() { |
900 return new MagnificationControllerImpl(); | 900 return new MagnificationControllerImpl(); |
901 } | 901 } |
902 | 902 |
903 } // namespace ash | 903 } // namespace ash |
OLD | NEW |