Home | History | Annotate | Download | only in message_center
      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;
     16 }
     17 
     18 // static
     19 void MessageCenter::Initialize() {
     20   DCHECK(g_message_center == NULL);
     21   g_message_center = new MessageCenterImpl();
     22 }
     23 
     24 // static
     25 MessageCenter* MessageCenter::Get() {
     26   DCHECK(g_message_center);
     27   return g_message_center;
     28 }
     29 
     30 // static
     31 void MessageCenter::Shutdown() {
     32   DCHECK(g_message_center);
     33   delete g_message_center;
     34   g_message_center = NULL;
     35 }
     36 
     37 MessageCenter::MessageCenter() {
     38 }
     39 
     40 MessageCenter::~MessageCenter() {
     41 }
     42 
     43 }  // namespace message_center
     44