| 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 <utility> | 8 #include <utility> |
| 8 | 9 |
| 9 #include "ash/accelerators/accelerator_controller.h" | 10 #include "ash/accelerators/accelerator_controller.h" |
| 10 #include "ash/accessibility_delegate.h" | 11 #include "ash/accessibility_delegate.h" |
| 11 #include "ash/ash_switches.h" | 12 #include "ash/ash_switches.h" |
| 12 #include "ash/display/root_window_transformers.h" | 13 #include "ash/display/root_window_transformers.h" |
| 13 #include "ash/host/ash_window_tree_host.h" | 14 #include "ash/host/ash_window_tree_host.h" |
| 14 #include "ash/host/root_window_transformer.h" | 15 #include "ash/host/root_window_transformer.h" |
| 15 #include "ash/root_window_controller.h" | 16 #include "ash/root_window_controller.h" |
| 16 #include "ash/screen_util.h" | 17 #include "ash/screen_util.h" |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 root_window_->layer()->GetAnimator()); | 367 root_window_->layer()->GetAnimator()); |
| 367 settings.AddObserver(this); | 368 settings.AddObserver(this); |
| 368 settings.SetPreemptionStrategy( | 369 settings.SetPreemptionStrategy( |
| 369 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 370 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| 370 settings.SetTweenType(tween_type); | 371 settings.SetTweenType(tween_type); |
| 371 settings.SetTransitionDuration( | 372 settings.SetTransitionDuration( |
| 372 base::TimeDelta::FromMilliseconds(duration_in_ms)); | 373 base::TimeDelta::FromMilliseconds(duration_in_ms)); |
| 373 | 374 |
| 374 gfx::Display display = | 375 gfx::Display display = |
| 375 gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_window_); | 376 gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_window_); |
| 376 scoped_ptr<RootWindowTransformer> transformer( | 377 std::unique_ptr<RootWindowTransformer> transformer( |
| 377 CreateRootWindowTransformerForDisplay(root_window_, display)); | 378 CreateRootWindowTransformerForDisplay(root_window_, display)); |
| 378 GetRootWindowController(root_window_) | 379 GetRootWindowController(root_window_) |
| 379 ->ash_host() | 380 ->ash_host() |
| 380 ->SetRootWindowTransformer(std::move(transformer)); | 381 ->SetRootWindowTransformer(std::move(transformer)); |
| 381 | 382 |
| 382 if (duration_in_ms > 0) | 383 if (duration_in_ms > 0) |
| 383 is_on_animation_ = true; | 384 is_on_animation_ = true; |
| 384 | 385 |
| 385 return true; | 386 return true; |
| 386 } | 387 } |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 | 854 |
| 854 //////////////////////////////////////////////////////////////////////////////// | 855 //////////////////////////////////////////////////////////////////////////////// |
| 855 // MagnificationController: | 856 // MagnificationController: |
| 856 | 857 |
| 857 // static | 858 // static |
| 858 MagnificationController* MagnificationController::CreateInstance() { | 859 MagnificationController* MagnificationController::CreateInstance() { |
| 859 return new MagnificationControllerImpl(); | 860 return new MagnificationControllerImpl(); |
| 860 } | 861 } |
| 861 | 862 |
| 862 } // namespace ash | 863 } // namespace ash |
| OLD | NEW |