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

Unified Diff: ash/aura/wm_shell_aura.cc

Issue 2194353002: mash: Migrate ScopedTargetRootWindow to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: non-virtual 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/common/scoped_root_window_for_new_windows.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/aura/wm_shell_aura.cc
diff --git a/ash/aura/wm_shell_aura.cc b/ash/aura/wm_shell_aura.cc
index 29af4b96cb5e2fec943568fa8f1b110694aab52f..6842682dde7c3f89ac7b3cd9e2974c1e975db46f 100644
--- a/ash/aura/wm_shell_aura.cc
+++ b/ash/aura/wm_shell_aura.cc
@@ -87,10 +87,6 @@ WmWindow* WmShellAura::GetRootWindowForDisplayId(int64_t display_id) {
->GetRootWindowForDisplayId(display_id));
}
-WmWindow* WmShellAura::GetRootWindowForNewWindows() {
- return WmWindowAura::Get(Shell::GetTargetRootWindow());
-}
-
const DisplayInfo& WmShellAura::GetDisplayInfo(int64_t display_id) const {
return Shell::GetInstance()->display_manager()->GetDisplayInfo(display_id);
}
@@ -230,9 +226,12 @@ void WmShellAura::OnWindowActivated(
aura::client::ActivationChangeObserver::ActivationReason reason,
aura::Window* gained_active,
aura::Window* lost_active) {
+ WmWindow* gained_active_wm = WmWindowAura::Get(gained_active);
+ WmWindow* lost_active_wm = WmWindowAura::Get(lost_active);
+ if (gained_active_wm)
+ set_root_window_for_new_windows(gained_active_wm->GetRootWindow());
FOR_EACH_OBSERVER(WmActivationObserver, activation_observers_,
- OnWindowActivated(WmWindowAura::Get(gained_active),
- WmWindowAura::Get(lost_active)));
+ OnWindowActivated(gained_active_wm, lost_active_wm));
}
void WmShellAura::OnAttemptToReactivateWindow(aura::Window* request_active,
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/common/scoped_root_window_for_new_windows.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698