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

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

Issue 1900443002: Removes aura dependencies from WindowPositioner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke GetWorkAreaForWindowInParent and fix windows Created 4 years, 8 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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 // Note: OnCaretBoundsChanged could be fired OnTextInputTypeChanged during 810 // Note: OnCaretBoundsChanged could be fired OnTextInputTypeChanged during
811 // which the caret position is not set a meaning position, and we do not 811 // which the caret position is not set a meaning position, and we do not
812 // need to adjust the view port position based on the bogus caret position. 812 // need to adjust the view port position based on the bogus caret position.
813 // This is only a transition period, the caret position will be fixed upon 813 // This is only a transition period, the caret position will be fixed upon
814 // focusing right after. 814 // focusing right after.
815 if (caret_bounds.width() == 0 && caret_bounds.height() == 0) 815 if (caret_bounds.width() == 0 && caret_bounds.height() == 0)
816 return; 816 return;
817 817
818 caret_point_ = caret_bounds.CenterPoint(); 818 caret_point_ = caret_bounds.CenterPoint();
819 // |caret_point_| in |root_window_| coordinates. 819 // |caret_point_| in |root_window_| coordinates.
820 wm::ConvertPointFromScreen(root_window_, &caret_point_); 820 ::wm::ConvertPointFromScreen(root_window_, &caret_point_);
821 821
822 // If the feature for centering the text input focus is disabled, the 822 // If the feature for centering the text input focus is disabled, the
823 // magnifier window will be moved to follow the focus with a panning margin. 823 // magnifier window will be moved to follow the focus with a panning margin.
824 if (!KeepFocusCentered()) { 824 if (!KeepFocusCentered()) {
825 // Visible window_rect in |root_window_| coordinates. 825 // Visible window_rect in |root_window_| coordinates.
826 const gfx::Rect visible_window_rect = GetViewportRect(); 826 const gfx::Rect visible_window_rect = GetViewportRect();
827 const int panning_margin = kCaretPanningMargin / scale_; 827 const int panning_margin = kCaretPanningMargin / scale_;
828 MoveMagnifierWindowFollowPoint(caret_point_, 828 MoveMagnifierWindowFollowPoint(caret_point_,
829 panning_margin, 829 panning_margin,
830 panning_margin, 830 panning_margin,
(...skipping 23 matching lines...) Expand all
854 854
855 //////////////////////////////////////////////////////////////////////////////// 855 ////////////////////////////////////////////////////////////////////////////////
856 // MagnificationController: 856 // MagnificationController:
857 857
858 // static 858 // static
859 MagnificationController* MagnificationController::CreateInstance() { 859 MagnificationController* MagnificationController::CreateInstance() {
860 return new MagnificationControllerImpl(); 860 return new MagnificationControllerImpl();
861 } 861 }
862 862
863 } // namespace ash 863 } // namespace ash
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_view.cc ('k') | ash/magnifier/magnification_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698