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

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

Issue 23724024: Refactor TransformPoint{,Reverse}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and resolve conflicts. Created 7 years, 3 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/display/display_controller_unittest.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/display/root_window_transformers.h" 7 #include "ash/display/root_window_transformers.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 26 matching lines...) Expand all
37 const float kInitialMagnifiedScale = 2.0f; 37 const float kInitialMagnifiedScale = 2.0f;
38 const float kScrollScaleChangeFactor = 0.05f; 38 const float kScrollScaleChangeFactor = 0.05f;
39 39
40 // Threadshold of panning. If the cursor moves to within pixels (in DIP) of 40 // Threadshold of panning. If the cursor moves to within pixels (in DIP) of
41 // |kPanningMergin| from the edge, the view-port moves. 41 // |kPanningMergin| from the edge, the view-port moves.
42 const int kPanningMergin = 100; 42 const int kPanningMergin = 100;
43 43
44 void MoveCursorTo(aura::RootWindow* root_window, 44 void MoveCursorTo(aura::RootWindow* root_window,
45 const gfx::Point& root_location) { 45 const gfx::Point& root_location) {
46 gfx::Point3F host_location_3f(root_location); 46 gfx::Point3F host_location_3f(root_location);
47 root_window->GetRootTransform().TransformPoint(host_location_3f); 47 root_window->GetRootTransform().TransformPoint(&host_location_3f);
48 root_window->MoveCursorToHostLocation( 48 root_window->MoveCursorToHostLocation(
49 gfx::ToCeiledPoint(host_location_3f.AsPointF())); 49 gfx::ToCeiledPoint(host_location_3f.AsPointF()));
50 } 50 }
51 51
52 } // namespace 52 } // namespace
53 53
54 namespace ash { 54 namespace ash {
55 55
56 //////////////////////////////////////////////////////////////////////////////// 56 ////////////////////////////////////////////////////////////////////////////////
57 // MagnificationControllerImpl: 57 // MagnificationControllerImpl:
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 622
623 //////////////////////////////////////////////////////////////////////////////// 623 ////////////////////////////////////////////////////////////////////////////////
624 // MagnificationController: 624 // MagnificationController:
625 625
626 // static 626 // static
627 MagnificationController* MagnificationController::CreateInstance() { 627 MagnificationController* MagnificationController::CreateInstance() {
628 return new MagnificationControllerImpl(); 628 return new MagnificationControllerImpl();
629 } 629 }
630 630
631 } // namespace ash 631 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | ash/rotator/screen_rotation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698