1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/message_center/message_center.h"
7 #include "base/observer_list.h"
8 #include "ui/message_center/message_center_impl.h"
10 namespace message_center
{
12 //------------------------------------------------------------------------------
15 static MessageCenter
* g_message_center
;
19 void MessageCenter::Initialize() {
20 DCHECK(g_message_center
== NULL
);
21 g_message_center
= new MessageCenterImpl();
25 MessageCenter
* MessageCenter::Get() {
26 DCHECK(g_message_center
);
27 return g_message_center
;
31 void MessageCenter::Shutdown() {
32 DCHECK(g_message_center
);
33 delete g_message_center
;
34 g_message_center
= NULL
;
37 MessageCenter::MessageCenter() {
40 MessageCenter::~MessageCenter() {
43 } // namespace message_center