diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-25 00:49:31 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-25 00:49:31 +0000 |
commit | 69f8dc80be91b57af76374d858f06f52cb36eb07 (patch) | |
tree | 217b33c9f29dc9d8fb7bff43be4e194720d17476 /ash | |
parent | a94fe6a7fb8d6bd3a3dda6ff5cf5ac4abf88745e (diff) | |
download | chromium_src-69f8dc80be91b57af76374d858f06f52cb36eb07.zip chromium_src-69f8dc80be91b57af76374d858f06f52cb36eb07.tar.gz chromium_src-69f8dc80be91b57af76374d858f06f52cb36eb07.tar.bz2 |
Delete "shutdown without closing browsers"
Removing unused ShellDelegate::Shutdown()
Added new PreShutdown to safely cleanup DisplayObserver.
Chrome no longer access X during shutdown (except for deleting X window, which is safe), so normal SessionEnd
path should work.
There is another issue when this happens during login screen, and I'll file a separate bug for it.
BUG=336653
Review URL: https://codereview.chromium.org/205963005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/shell.cc | 2 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.cc | 2 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.h | 2 | ||||
-rw-r--r-- | ash/shell_delegate.h | 5 | ||||
-rw-r--r-- | ash/test/test_shell_delegate.cc | 2 | ||||
-rw-r--r-- | ash/test/test_shell_delegate.h | 2 |
6 files changed, 9 insertions, 6 deletions
diff --git a/ash/shell.cc b/ash/shell.cc index 8f47b57..4c12d32 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -630,6 +630,8 @@ Shell::Shell(ShellDelegate* delegate) Shell::~Shell() { TRACE_EVENT0("shutdown", "ash::Shell::Destructor"); + delegate_->PreShutdown(); + views::FocusManagerFactory::Install(NULL); // Remove the focus from any window. This will prevent overhead and side diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index d21f7ac..4efd104 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -101,7 +101,7 @@ bool ShellDelegateImpl::IsRunningInForcedAppMode() const { void ShellDelegateImpl::PreInit() { } -void ShellDelegateImpl::Shutdown() { +void ShellDelegateImpl::PreShutdown() { } void ShellDelegateImpl::Exit() { diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index 2b5aa12..705ef21 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -39,7 +39,7 @@ class ShellDelegateImpl : public ash::ShellDelegate { virtual bool IsMultiProfilesEnabled() const OVERRIDE; virtual bool IsRunningInForcedAppMode() const OVERRIDE; virtual void PreInit() OVERRIDE; - virtual void Shutdown() OVERRIDE; + virtual void PreShutdown() OVERRIDE; virtual void Exit() OVERRIDE; virtual keyboard::KeyboardControllerProxy* CreateKeyboardControllerProxy() OVERRIDE; diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h index ba28e0c..9a4ac77 100644 --- a/ash/shell_delegate.h +++ b/ash/shell_delegate.h @@ -76,8 +76,9 @@ class ASH_EXPORT ShellDelegate { // can perform tasks necessary before the shell is initialized. virtual void PreInit() = 0; - // Shuts down the environment. - virtual void Shutdown() = 0; + // Called at the beginninig of Shell destructor so that + // delegate can use Shell instance to perform cleanup tasks. + virtual void PreShutdown() = 0; // Invoked when the user uses Ctrl-Shift-Q to close chrome. virtual void Exit() = 0; diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc index 57c76cc..fe981d7 100644 --- a/ash/test/test_shell_delegate.cc +++ b/ash/test/test_shell_delegate.cc @@ -80,7 +80,7 @@ bool TestShellDelegate::IsRunningInForcedAppMode() const { void TestShellDelegate::PreInit() { } -void TestShellDelegate::Shutdown() { +void TestShellDelegate::PreShutdown() { } void TestShellDelegate::Exit() { diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h index a41d1bb..9e610b6 100644 --- a/ash/test/test_shell_delegate.h +++ b/ash/test/test_shell_delegate.h @@ -35,7 +35,7 @@ class TestShellDelegate : public ShellDelegate { virtual bool IsMultiProfilesEnabled() const OVERRIDE; virtual bool IsRunningInForcedAppMode() const OVERRIDE; virtual void PreInit() OVERRIDE; - virtual void Shutdown() OVERRIDE; + virtual void PreShutdown() OVERRIDE; virtual void Exit() OVERRIDE; virtual keyboard::KeyboardControllerProxy* CreateKeyboardControllerProxy() OVERRIDE; |