summaryrefslogtreecommitdiffstats
path: root/ui/views
diff options
context:
space:
mode:
authorsschmitz@chromium.org <sschmitz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-20 16:34:51 +0000
committersschmitz@chromium.org <sschmitz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-20 16:34:51 +0000
commite04eb0ba4f6d5338b03382e3bb3b1f3bfc53ff40 (patch)
tree0c16ac6d16c42d2841e1ba1c49e06a6281df8822 /ui/views
parent3916c69d95b83f2b62d1c1ad9801a4edbec030fd (diff)
downloadchromium_src-e04eb0ba4f6d5338b03382e3bb3b1f3bfc53ff40.zip
chromium_src-e04eb0ba4f6d5338b03382e3bb3b1f3bfc53ff40.tar.gz
chromium_src-e04eb0ba4f6d5338b03382e3bb3b1f3bfc53ff40.tar.bz2
Observe for window's (self) deletion during activation/focus change.
Added a windows destruction observer. It is use to observe (detect) when an Aura Window or RenderWidgetHostViewAura is deleted during execution of a member function because of activation/focus change. This fixes browser crashes when exiting fullscreen Flash with ESC. BUG=197023 TEST=Press ESC when in full-screen Flash Review URL: https://chromiumcodereview.appspot.com/12929002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189308 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r--ui/views/corewm/focus_controller.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/views/corewm/focus_controller.cc b/ui/views/corewm/focus_controller.cc
index 7803667..4a893d8 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(