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

Side by Side Diff: ash/display/window_tree_host_manager.cc

Issue 2269383002: Magnifier border is now more visible on light backgrounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 4 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/display/window_tree_host_manager.h" 5 #include "ash/display/window_tree_host_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 AshWindowTreeHost* ash_host = 577 AshWindowTreeHost* ash_host =
578 AddWindowTreeHostForDisplay(display, AshWindowTreeHostInitParams()); 578 AddWindowTreeHostForDisplay(display, AshWindowTreeHostInitParams());
579 RootWindowController::CreateForSecondaryDisplay(ash_host); 579 RootWindowController::CreateForSecondaryDisplay(ash_host);
580 580
581 // Magnifier controllers keep pointers to the current root window. 581 // Magnifier controllers keep pointers to the current root window.
582 // Update them here to avoid accessing them later. 582 // Update them here to avoid accessing them later.
583 Shell::GetInstance()->magnification_controller()->SwitchTargetRootWindow( 583 Shell::GetInstance()->magnification_controller()->SwitchTargetRootWindow(
584 ash_host->AsWindowTreeHost()->window(), false); 584 ash_host->AsWindowTreeHost()->window(), false);
585 Shell::GetInstance() 585 Shell::GetInstance()
586 ->partial_magnification_controller() 586 ->partial_magnification_controller()
587 ->SwitchTargetRootWindow(ash_host->AsWindowTreeHost()->window()); 587 ->SwitchTargetRootWindowIfNeeded(
588 ash_host->AsWindowTreeHost()->window());
588 589
589 AshWindowTreeHost* to_delete = primary_tree_host_for_replace_; 590 AshWindowTreeHost* to_delete = primary_tree_host_for_replace_;
590 primary_tree_host_for_replace_ = nullptr; 591 primary_tree_host_for_replace_ = nullptr;
591 592
592 // Show the shelf if the original WTH had a visible system 593 // Show the shelf if the original WTH had a visible system
593 // tray. It may or may not be visible depending on OOBE state. 594 // tray. It may or may not be visible depending on OOBE state.
594 ash::SystemTray* old_tray = 595 ash::SystemTray* old_tray =
595 GetRootWindowController(to_delete->AsWindowTreeHost()->window()) 596 GetRootWindowController(to_delete->AsWindowTreeHost()->window())
596 ->GetSystemTray(); 597 ->GetSystemTray();
597 ash::SystemTray* new_tray = 598 ash::SystemTray* new_tray =
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 SetDisplayPropertiesOnHost(ash_host, display); 846 SetDisplayPropertiesOnHost(ash_host, display);
846 847
847 #if defined(OS_CHROMEOS) 848 #if defined(OS_CHROMEOS)
848 if (switches::ConstrainPointerToRoot()) 849 if (switches::ConstrainPointerToRoot())
849 ash_host->ConfineCursorToRootWindow(); 850 ash_host->ConfineCursorToRootWindow();
850 #endif 851 #endif
851 return ash_host; 852 return ash_host;
852 } 853 }
853 854
854 } // namespace ash 855 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698