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/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ui/aura/client/cursor_client.h" | 9 #include "ui/aura/client/cursor_client.h" |
10 #include "ui/aura/event_filter.h" | 10 #include "ui/aura/event_filter.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 origin_.y() == y && | 189 origin_.y() == y && |
190 scale == scale_) { | 190 scale == scale_) { |
191 return false; | 191 return false; |
192 } | 192 } |
193 | 193 |
194 origin_.set_x(x); | 194 origin_.set_x(x); |
195 origin_.set_y(y); | 195 origin_.set_y(y); |
196 scale_ = scale; | 196 scale_ = scale; |
197 | 197 |
198 // Creates transform matrix. | 198 // Creates transform matrix. |
199 ui::Transform transform; | 199 gfx::Transform transform; |
200 // Flips the signs intentionally to convert them from the position of the | 200 // Flips the signs intentionally to convert them from the position of the |
201 // magnification window. | 201 // magnification window. |
202 transform.ConcatTranslate(-origin_.x(), -origin_.y()); | 202 transform.ConcatTranslate(-origin_.x(), -origin_.y()); |
203 transform.ConcatScale(scale_, scale_); | 203 transform.ConcatScale(scale_, scale_); |
204 | 204 |
205 ui::ScopedLayerAnimationSettings settings( | 205 ui::ScopedLayerAnimationSettings settings( |
206 root_window_->layer()->GetAnimator()); | 206 root_window_->layer()->GetAnimator()); |
207 settings.AddObserver(this); | 207 settings.AddObserver(this); |
208 settings.SetPreemptionStrategy( | 208 settings.SetPreemptionStrategy( |
209 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 209 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 //////////////////////////////////////////////////////////////////////////////// | 483 //////////////////////////////////////////////////////////////////////////////// |
484 // MagnificationController: | 484 // MagnificationController: |
485 | 485 |
486 // static | 486 // static |
487 MagnificationController* MagnificationController::CreateInstance() { | 487 MagnificationController* MagnificationController::CreateInstance() { |
488 return new MagnificationControllerImpl(); | 488 return new MagnificationControllerImpl(); |
489 } | 489 } |
490 | 490 |
491 } // namespace internal | 491 } // namespace internal |
492 } // namespace ash | 492 } // namespace ash |
OLD | NEW |