OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_FACTORY_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/singleton.h" |
| 10 #include "chrome/browser/notifications/notification_display_service.h" |
| 11 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 12 |
| 13 class NotificationDisplayService; |
| 14 |
| 15 class NotificationDisplayServiceFactory |
| 16 : public BrowserContextKeyedServiceFactory { |
| 17 public: |
| 18 static NotificationDisplayService* GetForProfile(Profile* profile); |
| 19 static NotificationDisplayServiceFactory* GetInstance(); |
| 20 |
| 21 private: |
| 22 friend struct base::DefaultSingletonTraits<NotificationDisplayServiceFactory>; |
| 23 |
| 24 NotificationDisplayServiceFactory(); |
| 25 |
| 26 // BrowserContextKeyedBaseFactory implementation. |
| 27 KeyedService* BuildServiceInstanceFor( |
| 28 content::BrowserContext* context) const override; |
| 29 content::BrowserContext* GetBrowserContextToUse( |
| 30 content::BrowserContext* context) const override; |
| 31 DISALLOW_COPY_AND_ASSIGN(NotificationDisplayServiceFactory); |
| 32 }; |
| 33 |
| 34 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_FACTORY_H_ |
OLD | NEW |