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

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

Issue 2739553005: Moves maintaining root_window_for_new_windows_ to Shell (Closed)
Patch Set: remove ash:: Created 3 years, 9 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/common/accelerators/accelerator_controller.h" 10 #include "ash/common/accelerators/accelerator_controller.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 StartOrStopScrollIfNecessary(); 533 StartOrStopScrollIfNecessary();
534 } 534 }
535 535
536 void MagnificationControllerImpl::OnWindowDestroying( 536 void MagnificationControllerImpl::OnWindowDestroying(
537 aura::Window* root_window) { 537 aura::Window* root_window) {
538 if (root_window == root_window_) { 538 if (root_window == root_window_) {
539 // There must be at least one root window because this controller is 539 // There must be at least one root window because this controller is
540 // destroyed before the root windows get destroyed. 540 // destroyed before the root windows get destroyed.
541 DCHECK(root_window); 541 DCHECK(root_window);
542 542
543 aura::Window* target_root_window = Shell::GetTargetRootWindow(); 543 aura::Window* target_root_window = Shell::GetRootWindowForNewWindows();
544 CHECK(target_root_window); 544 CHECK(target_root_window);
545 545
546 // The destroyed root window must not be target. 546 // The destroyed root window must not be target.
547 CHECK_NE(target_root_window, root_window); 547 CHECK_NE(target_root_window, root_window);
548 // Don't redraw the old root window as it's being destroyed. 548 // Don't redraw the old root window as it's being destroyed.
549 SwitchTargetRootWindow(target_root_window, false); 549 SwitchTargetRootWindow(target_root_window, false);
550 point_of_interest_ = target_root_window->bounds().CenterPoint(); 550 point_of_interest_ = target_root_window->bounds().CenterPoint();
551 } 551 }
552 } 552 }
553 553
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 886
887 //////////////////////////////////////////////////////////////////////////////// 887 ////////////////////////////////////////////////////////////////////////////////
888 // MagnificationController: 888 // MagnificationController:
889 889
890 // static 890 // static
891 MagnificationController* MagnificationController::CreateInstance() { 891 MagnificationController* MagnificationController::CreateInstance() {
892 return new MagnificationControllerImpl(); 892 return new MagnificationControllerImpl();
893 } 893 }
894 894
895 } // namespace ash 895 } // namespace ash
OLDNEW
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/mus/accelerators/accelerator_controller_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698