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

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: Should pass trybots this time 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
« no previous file with comments | « ash/launcher/overflow_button.cc ('k') | ash/rotator/screen_rotation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « ash/launcher/overflow_button.cc ('k') | ash/rotator/screen_rotation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698