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

Unified Diff: ash/display/window_tree_host_manager.cc

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase AGAIN Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/extended_mouse_warp_controller.cc ('k') | ash/extended_desktop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/window_tree_host_manager.cc
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc
index 85f3b12e0aef545044450da11b361f261ddbe06b..e5d787ef24d633d19476b2271b65f0c186f9a4e3 100644
--- a/ash/display/window_tree_host_manager.cc
+++ b/ash/display/window_tree_host_manager.cc
@@ -273,7 +273,7 @@ void WindowTreeHostManager::Shutdown() {
RootWindowController* primary_rwc = nullptr;
for (aura::Window::Windows::iterator iter = root_windows.begin();
iter != root_windows.end(); ++iter) {
- RootWindowController* rwc = GetRootWindowController(*iter);
+ RootWindowController* rwc = RootWindowController::ForWindow(*iter);
if (GetRootWindowSettings(*iter)->display_id == primary_id)
primary_rwc = rwc;
else
@@ -350,7 +350,7 @@ aura::Window::Windows WindowTreeHostManager::GetAllRootWindows() {
for (WindowTreeHostMap::const_iterator it = window_tree_hosts_.begin();
it != window_tree_hosts_.end(); ++it) {
DCHECK(it->second);
- if (GetRootWindowController(GetWindow(it->second)))
+ if (RootWindowController::ForWindow(GetWindow(it->second)))
windows.push_back(GetWindow(it->second));
}
return windows;
@@ -372,7 +372,7 @@ WindowTreeHostManager::GetAllRootWindowControllers() {
for (WindowTreeHostMap::const_iterator it = window_tree_hosts_.begin();
it != window_tree_hosts_.end(); ++it) {
RootWindowController* controller =
- GetRootWindowController(GetWindow(it->second));
+ RootWindowController::ForWindow(GetWindow(it->second));
if (controller)
controllers.push_back(controller);
}
@@ -583,7 +583,7 @@ void WindowTreeHostManager::OnDisplayAdded(const display::Display& display) {
// Show the shelf if the original WTH had a visible system
// tray. It may or may not be visible depending on OOBE state.
ash::SystemTray* old_tray =
- GetRootWindowController(to_delete->AsWindowTreeHost()->window())
+ RootWindowController::ForWindow(to_delete->AsWindowTreeHost()->window())
->GetSystemTray();
ash::SystemTray* new_tray = ash::Shell::Get()->GetPrimarySystemTray();
if (old_tray->GetWidget()->IsVisible()) {
@@ -630,7 +630,7 @@ void WindowTreeHostManager::OnDisplayAdded(const display::Display& display) {
void WindowTreeHostManager::DeleteHost(AshWindowTreeHost* host_to_delete) {
ClearDisplayPropertiesOnHost(host_to_delete);
RootWindowController* controller =
- GetRootWindowController(GetWindow(host_to_delete));
+ RootWindowController::ForWindow(GetWindow(host_to_delete));
DCHECK(controller);
controller->MoveWindowsTo(GetPrimaryRootWindow());
// Delete most of root window related objects, but don't delete
« no previous file with comments | « ash/display/extended_mouse_warp_controller.cc ('k') | ash/extended_desktop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698