diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-03 22:25:40 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-03 22:25:40 +0000 |
commit | f9c52dd81b049e78aba384cd7b87789b84edce19 (patch) | |
tree | a3e33a2d94ab91bc87ea69529367126dc7ee868d /content/shell | |
parent | ae37cf5f779516f51647fa348b542e355d400b77 (diff) | |
download | chromium_src-f9c52dd81b049e78aba384cd7b87789b84edce19.zip chromium_src-f9c52dd81b049e78aba384cd7b87789b84edce19.tar.gz chromium_src-f9c52dd81b049e78aba384cd7b87789b84edce19.tar.bz2 |
desktop aura: Make the close button work.
Previously, RootWindow and the DesktopRootWindowHost owned each other, causing
both objects to never be freed. This patch makes DesktopNativeWidgetAura ask
the DesktopRootWindowHost to build the RootWindow and return it, so DNWA can
own it.
views_examples_with_content now shuts down cleanly when the close button is
pressed.
BUG=146077
Review URL: https://chromiumcodereview.appspot.com/10984078
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r-- | content/shell/shell_aura.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/content/shell/shell_aura.cc b/content/shell/shell_aura.cc index 6345017..ebbd75e 100644 --- a/content/shell/shell_aura.cc +++ b/content/shell/shell_aura.cc @@ -235,7 +235,10 @@ class ShellWindowDelegateView : public WidgetDelegateView, return title_; } virtual void WindowClosing() OVERRIDE { - if (shell_) delete shell_; + if (shell_) { + delete shell_; + shell_ = NULL; + } } virtual View* GetContentsView() OVERRIDE { return this; } @@ -288,6 +291,8 @@ void Shell::PlatformInitialize() { stacking_client_ = new aura::DesktopStackingClient(); gfx::Screen::SetInstance(aura::CreateDesktopScreen()); views_delegate_ = new ShellViewsDelegateAura(); + + CommandLine::ForCurrentProcess()->AppendSwitch(views::switches::kDesktopAura); } void Shell::PlatformExit() { |