From 60dc931194a31434462332b74dfad1f4fd308a6f Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Wed, 14 Dec 2011 18:17:22 +0000 Subject: Hide the process of instantiating NotificationServiceImpl from embedders. Make NotificationService handle the process of instantiating NotificationServiceImpl instead. BUG=98716 R=jam@chromium.org TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/8913009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114454 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/notification_service_impl.cc | 5 +++++ content/public/browser/notification_service.h | 2 ++ 2 files changed, 7 insertions(+) (limited to 'content') diff --git a/content/browser/notification_service_impl.cc b/content/browser/notification_service_impl.cc index 221a883..327e28f 100644 --- a/content/browser/notification_service_impl.cc +++ b/content/browser/notification_service_impl.cc @@ -23,6 +23,11 @@ content::NotificationService* content::NotificationService::current() { } // static +content::NotificationService* content::NotificationService::Create() { + return new NotificationServiceImpl; +} + +// static bool NotificationServiceImpl::HasKey(const NotificationSourceMap& map, const content::NotificationSource& source) { return map.find(source.map_key()) != map.end(); diff --git a/content/public/browser/notification_service.h b/content/public/browser/notification_service.h index 006373b..4a6c6c6 100644 --- a/content/public/browser/notification_service.h +++ b/content/public/browser/notification_service.h @@ -22,6 +22,8 @@ class CONTENT_EXPORT NotificationService { // none. static NotificationService* current(); + static NotificationService* Create(); + virtual ~NotificationService() {} // Synchronously posts a notification to all interested observers. -- cgit v1.1