Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: ash/magnifier/magnification_controller.cc

Issue 11087093: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/event_filter.h" 9 #include "ui/aura/event_filter.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 origin_.y() == y && 188 origin_.y() == y &&
189 scale == scale_) { 189 scale == scale_) {
190 return false; 190 return false;
191 } 191 }
192 192
193 origin_.set_x(x); 193 origin_.set_x(x);
194 origin_.set_y(y); 194 origin_.set_y(y);
195 scale_ = scale; 195 scale_ = scale;
196 196
197 // Creates transform matrix. 197 // Creates transform matrix.
198 ui::Transform transform; 198 gfx::Transform transform;
199 // Flips the signs intentionally to convert them from the position of the 199 // Flips the signs intentionally to convert them from the position of the
200 // magnification window. 200 // magnification window.
201 transform.ConcatTranslate(-origin_.x(), -origin_.y()); 201 transform.ConcatTranslate(-origin_.x(), -origin_.y());
202 transform.ConcatScale(scale_, scale_); 202 transform.ConcatScale(scale_, scale_);
203 203
204 ui::ScopedLayerAnimationSettings settings( 204 ui::ScopedLayerAnimationSettings settings(
205 root_window_->layer()->GetAnimator()); 205 root_window_->layer()->GetAnimator());
206 settings.AddObserver(this); 206 settings.AddObserver(this);
207 settings.SetPreemptionStrategy( 207 settings.SetPreemptionStrategy(
208 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); 208 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 //////////////////////////////////////////////////////////////////////////////// 476 ////////////////////////////////////////////////////////////////////////////////
477 // MagnificationController: 477 // MagnificationController:
478 478
479 // static 479 // static
480 MagnificationController* MagnificationController::CreateInstance() { 480 MagnificationController* MagnificationController::CreateInstance() {
481 return new MagnificationControllerImpl(); 481 return new MagnificationControllerImpl();
482 } 482 }
483 483
484 } // namespace internal 484 } // namespace internal
485 } // namespace ash 485 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698