Home | History | Annotate | Download | only in notifications
      1 // Copyright 2014 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 "chrome/browser/notifications/notification_ui_manager.h"
      6 
      7 #include "base/memory/scoped_ptr.h"
      8 #include "chrome/browser/browser_process.h"
      9 #include "chrome/browser/notifications/message_center_notification_manager.h"
     10 #include "chrome/browser/notifications/message_center_settings_controller.h"
     11 #include "chrome/browser/profiles/profile.h"
     12 #include "chrome/browser/profiles/profile_info_cache.h"
     13 #include "chrome/browser/profiles/profile_manager.h"
     14 
     15 // static
     16 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) {
     17   ProfileInfoCache* profile_info_cache =
     18       &g_browser_process->profile_manager()->GetProfileInfoCache();
     19   scoped_ptr<message_center::NotifierSettingsProvider> settings_provider(
     20       new MessageCenterSettingsController(profile_info_cache));
     21   return new MessageCenterNotificationManager(
     22       g_browser_process->message_center(),
     23       local_state,
     24       settings_provider.Pass());
     25 }
     26