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

Unified Diff: ui/views/corewm/focus_controller.cc

Issue 12929002: Observe for window's (self) deletion during activation/focus change (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nits Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/window_destruction_observer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/focus_controller.cc
diff --git a/ui/views/corewm/focus_controller.cc b/ui/views/corewm/focus_controller.cc
index 780366701c12737049a8b7b3aa386d274e815ea2..4a893d89350d693f69096c21b421c1e149d2d0cc 100644
--- a/ui/views/corewm/focus_controller.cc
+++ b/ui/views/corewm/focus_controller.cc
@@ -285,9 +285,6 @@ void FocusController::SetActiveWindow(aura::Window* window) {
active_window_->parent()->StackChildAtTop(active_window_);
}
- FOR_EACH_OBSERVER(aura::client::ActivationChangeObserver,
- activation_observers_,
- OnWindowActivated(active_window_, lost_activation));
aura::client::ActivationChangeObserver* observer =
aura::client::GetActivationChangeObserver(lost_activation);
if (observer)
@@ -295,6 +292,9 @@ void FocusController::SetActiveWindow(aura::Window* window) {
observer = aura::client::GetActivationChangeObserver(active_window_);
if (observer)
observer->OnWindowActivated(active_window_, lost_activation);
+ FOR_EACH_OBSERVER(aura::client::ActivationChangeObserver,
+ activation_observers_,
+ OnWindowActivated(active_window_, lost_activation));
}
void FocusController::WindowLostFocusFromDispositionChange(
« no previous file with comments | « ui/aura/window_destruction_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698