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 "ash/ash_root_window_transformer.h" | |
8 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
9 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
| 9 #include "ash/display/root_window_transformers.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
11 #include "ash/shell_delegate.h" | 11 #include "ash/shell_delegate.h" |
12 #include "ash/system/tray/system_tray_delegate.h" | 12 #include "ash/system/tray/system_tray_delegate.h" |
13 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
14 #include "ui/aura/client/cursor_client.h" | 14 #include "ui/aura/client/cursor_client.h" |
15 #include "ui/aura/root_window.h" | 15 #include "ui/aura/root_window.h" |
16 #include "ui/aura/root_window_transformer.h" | 16 #include "ui/aura/root_window_transformer.h" |
17 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
18 #include "ui/aura/window_property.h" | 18 #include "ui/aura/window_property.h" |
19 #include "ui/base/events/event.h" | 19 #include "ui/base/events/event.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 settings.AddObserver(this); | 267 settings.AddObserver(this); |
268 settings.SetPreemptionStrategy( | 268 settings.SetPreemptionStrategy( |
269 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 269 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
270 settings.SetTweenType(ui::Tween::EASE_OUT); | 270 settings.SetTweenType(ui::Tween::EASE_OUT); |
271 settings.SetTransitionDuration( | 271 settings.SetTransitionDuration( |
272 base::TimeDelta::FromMilliseconds(animate ? 100 : 0)); | 272 base::TimeDelta::FromMilliseconds(animate ? 100 : 0)); |
273 | 273 |
274 gfx::Display display = | 274 gfx::Display display = |
275 Shell::GetScreen()->GetDisplayNearestWindow(root_window_); | 275 Shell::GetScreen()->GetDisplayNearestWindow(root_window_); |
276 scoped_ptr<aura::RootWindowTransformer> transformer( | 276 scoped_ptr<aura::RootWindowTransformer> transformer( |
277 new AshRootWindowTransformer(root_window_, display)); | 277 internal::CreateRootWindowTransformerForDisplay(root_window_, display)); |
278 root_window_->SetRootWindowTransformer(transformer.Pass()); | 278 root_window_->SetRootWindowTransformer(transformer.Pass()); |
279 | 279 |
280 if (animate) | 280 if (animate) |
281 is_on_animation_ = true; | 281 is_on_animation_ = true; |
282 | 282 |
283 return true; | 283 return true; |
284 } | 284 } |
285 | 285 |
286 void MagnificationControllerImpl::EnsureRectIsVisibleWithScale( | 286 void MagnificationControllerImpl::EnsureRectIsVisibleWithScale( |
287 const gfx::Rect& target_rect, | 287 const gfx::Rect& target_rect, |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 | 624 |
625 //////////////////////////////////////////////////////////////////////////////// | 625 //////////////////////////////////////////////////////////////////////////////// |
626 // MagnificationController: | 626 // MagnificationController: |
627 | 627 |
628 // static | 628 // static |
629 MagnificationController* MagnificationController::CreateInstance() { | 629 MagnificationController* MagnificationController::CreateInstance() { |
630 return new MagnificationControllerImpl(); | 630 return new MagnificationControllerImpl(); |
631 } | 631 } |
632 | 632 |
633 } // namespace ash | 633 } // namespace ash |
OLD | NEW |