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. 4 5 #include "ui/message_center/message_center.h" 6 7 #include "base/observer_list.h" 8 #include "ui/message_center/message_center_impl.h" 9 10 namespace message_center { 11 12 //------------------------------------------------------------------------------ 13 14 namespace { 15 static MessageCenter* g_message_center = NULL; 16 } 17 18 // static Initialize()19void MessageCenter::Initialize() { 20 DCHECK(g_message_center == NULL); 21 g_message_center = new MessageCenterImpl(); 22 } 23 24 // static Get()25MessageCenter* MessageCenter::Get() { 26 DCHECK(g_message_center); 27 return g_message_center; 28 } 29 30 // static Shutdown()31void MessageCenter::Shutdown() { 32 DCHECK(g_message_center); 33 delete g_message_center; 34 g_message_center = NULL; 35 } 36 MessageCenter()37MessageCenter::MessageCenter() { 38 } 39 ~MessageCenter()40MessageCenter::~MessageCenter() { 41 } 42 43 } // namespace message_center 44