summaryrefslogtreecommitdiffstats
path: root/ash/shell/content_client
diff options
context:
space:
mode:
authordewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-06 04:47:44 +0000
committerdewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-06 04:47:44 +0000
commit74102bede036e2af799eca91ec8f1c4b853f024e (patch)
tree6697bd0b9df2545360612a128b73384703b0c009 /ash/shell/content_client
parent728c3dfc630a58b33be95efc467b529ed9519408 (diff)
downloadchromium_src-74102bede036e2af799eca91ec8f1c4b853f024e.zip
chromium_src-74102bede036e2af799eca91ec8f1c4b853f024e.tar.gz
chromium_src-74102bede036e2af799eca91ec8f1c4b853f024e.tar.bz2
Fix ash_shell to initialize the message center.
Regression from crrev.com/12375004. BUG=NONE Review URL: https://chromiumcodereview.appspot.com/12488003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell/content_client')
-rw-r--r--ash/shell/content_client/shell_browser_main_parts.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/ash/shell/content_client/shell_browser_main_parts.cc b/ash/shell/content_client/shell_browser_main_parts.cc
index afd9147..cb5975f 100644
--- a/ash/shell/content_client/shell_browser_main_parts.cc
+++ b/ash/shell/content_client/shell_browser_main_parts.cc
@@ -31,6 +31,10 @@
#include "ui/views/focus/accelerator_handler.h"
#include "ui/views/test/test_views_delegate.h"
+#if defined(ENABLE_MESSAGE_CENTER)
+#include "ui/message_center/message_center.h"
+#endif
+
#if defined(OS_LINUX)
#include "ui/base/touch/touch_factory.h"
#endif
@@ -105,6 +109,11 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
views::ViewsDelegate::views_delegate = new ShellViewsDelegate;
delegate_ = new ash::shell::ShellDelegateImpl;
+#if defined(ENABLE_MESSAGE_CENTER)
+ // The global message center state must be initialized absent
+ // g_browser_process.
+ message_center::MessageCenter::Initialize();
+#endif
ash::Shell::CreateInstance(delegate_);
ash::Shell::GetInstance()->set_browser_context(browser_context_.get());
@@ -134,6 +143,11 @@ void ShellBrowserMainParts::PostMainMessageLoopRun() {
delegate_->SetWatcher(NULL);
delegate_ = NULL;
ash::Shell::DeleteInstance();
+#if defined(ENABLE_MESSAGE_CENTER)
+ // The global message center state must be shutdown absent
+ // g_browser_process.
+ message_center::MessageCenter::Shutdown();
+#endif
aura::Env::DeleteInstance();
}