diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-08 01:49:32 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-08 01:49:32 +0000 |
commit | 0922e066c27ada7d45acf8b92985f00f532f3e48 (patch) | |
tree | b9609c0b9e8d49dacda74c6399ee3678e9de3c38 /ash | |
parent | 4286a006bf067a3a6dbef4a3ec1708416c3e9ad3 (diff) | |
download | chromium_src-0922e066c27ada7d45acf8b92985f00f532f3e48.zip chromium_src-0922e066c27ada7d45acf8b92985f00f532f3e48.tar.gz chromium_src-0922e066c27ada7d45acf8b92985f00f532f3e48.tar.bz2 |
Close background widget synchronously when root window is deleted.
Posting another task when destroying widget in posted CloseNow is too late.
BUG=75023
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9339001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/shell.cc | 4 | ||||
-rw-r--r-- | ash/wm/root_window_layout_manager.cc | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ash/shell.cc b/ash/shell.cc index ac9d079..0e2c11e 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -216,6 +216,10 @@ Shell::~Shell() { RemoveRootWindowEventFilter(window_modality_controller_.get()); RemoveRootWindowEventFilter(accelerator_filter_.get()); + // Close background widget now so that the focus manager of the + // widget gets deleted in the final message loop run. + root_window_layout_->SetBackgroundWidget(NULL); + // TooltipController needs a valid shell instance. We delete it before // deleting the shell |instance_|. RemoveRootWindowEventFilter(tooltip_controller_.get()); diff --git a/ash/wm/root_window_layout_manager.cc b/ash/wm/root_window_layout_manager.cc index 55acb16..56013f6 100644 --- a/ash/wm/root_window_layout_manager.cc +++ b/ash/wm/root_window_layout_manager.cc @@ -25,8 +25,9 @@ RootWindowLayoutManager::~RootWindowLayoutManager() { void RootWindowLayoutManager::SetBackgroundWidget(views::Widget* widget) { if (widget == background_widget_) return; + // Close now so that the focus manager will be deleted before shutdown. if (background_widget_) - background_widget_->Close(); + background_widget_->CloseNow(); background_widget_ = widget; } |