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

Unified Diff: ash/wm/mru_window_tracker.cc

Issue 115453004: Moves management of transients out of Window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unneeded parens Created 6 years, 11 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/wm/mru_window_tracker.h ('k') | ash/wm/overview/scoped_transform_overview_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/mru_window_tracker.cc
diff --git a/ash/wm/mru_window_tracker.cc b/ash/wm/mru_window_tracker.cc
index 4ed9a1df7230add4d26cfe61e7f7828bd220b76a..af703e9aa12aba161aa304b6ce1a30f596b5aa12 100644
--- a/ash/wm/mru_window_tracker.cc
+++ b/ash/wm/mru_window_tracker.cc
@@ -190,7 +190,10 @@ void MruWindowTracker::OnWindowActivated(aura::Window* gained_active,
SetActiveWindow(gained_active);
}
-void MruWindowTracker::OnWindowDestroying(aura::Window* window) {
+void MruWindowTracker::OnWindowDestroyed(aura::Window* window) {
+ // It's possible for OnWindowActivated() to be called after
+ // OnWindowDestroying(). This means we need to override OnWindowDestroyed()
+ // else we may end up with a deleted window in |mru_windows_|.
mru_windows_.remove(window);
window->RemoveObserver(this);
}
« no previous file with comments | « ash/wm/mru_window_tracker.h ('k') | ash/wm/overview/scoped_transform_overview_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698