| 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/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/accessibility_delegate.h" | 8 #include "ash/accessibility_delegate.h" |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/display/root_window_transformers.h" | 10 #include "ash/display/root_window_transformers.h" |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 settings.AddObserver(this); | 264 settings.AddObserver(this); |
| 265 settings.SetPreemptionStrategy( | 265 settings.SetPreemptionStrategy( |
| 266 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 266 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| 267 settings.SetTweenType(gfx::Tween::EASE_OUT); | 267 settings.SetTweenType(gfx::Tween::EASE_OUT); |
| 268 settings.SetTransitionDuration( | 268 settings.SetTransitionDuration( |
| 269 base::TimeDelta::FromMilliseconds(animate ? 100 : 0)); | 269 base::TimeDelta::FromMilliseconds(animate ? 100 : 0)); |
| 270 | 270 |
| 271 gfx::Display display = | 271 gfx::Display display = |
| 272 Shell::GetScreen()->GetDisplayNearestWindow(root_window_); | 272 Shell::GetScreen()->GetDisplayNearestWindow(root_window_); |
| 273 scoped_ptr<aura::RootWindowTransformer> transformer( | 273 scoped_ptr<aura::RootWindowTransformer> transformer( |
| 274 internal::CreateRootWindowTransformerForDisplay(root_window_, display)); | 274 CreateRootWindowTransformerForDisplay(root_window_, display)); |
| 275 root_window_->GetHost()->SetRootWindowTransformer(transformer.Pass()); | 275 root_window_->GetHost()->SetRootWindowTransformer(transformer.Pass()); |
| 276 | 276 |
| 277 if (animate) | 277 if (animate) |
| 278 is_on_animation_ = true; | 278 is_on_animation_ = true; |
| 279 | 279 |
| 280 return true; | 280 return true; |
| 281 } | 281 } |
| 282 | 282 |
| 283 void MagnificationControllerImpl::StartOrStopScrollIfNecessary() { | 283 void MagnificationControllerImpl::StartOrStopScrollIfNecessary() { |
| 284 // This value controls the scrolling speed. | 284 // This value controls the scrolling speed. |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 | 596 |
| 597 //////////////////////////////////////////////////////////////////////////////// | 597 //////////////////////////////////////////////////////////////////////////////// |
| 598 // MagnificationController: | 598 // MagnificationController: |
| 599 | 599 |
| 600 // static | 600 // static |
| 601 MagnificationController* MagnificationController::CreateInstance() { | 601 MagnificationController* MagnificationController::CreateInstance() { |
| 602 return new MagnificationControllerImpl(); | 602 return new MagnificationControllerImpl(); |
| 603 } | 603 } |
| 604 | 604 |
| 605 } // namespace ash | 605 } // namespace ash |
| OLD | NEW |