summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-14 18:17:22 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-14 18:17:22 +0000
commit60dc931194a31434462332b74dfad1f4fd308a6f (patch)
treeecf4ec6c85f29da69bfbd4b1fce0482eaa7783f3 /content
parentd76adec235c3351bfb4e70097d8bf6239183971b (diff)
downloadchromium_src-60dc931194a31434462332b74dfad1f4fd308a6f.zip
chromium_src-60dc931194a31434462332b74dfad1f4fd308a6f.tar.gz
chromium_src-60dc931194a31434462332b74dfad1f4fd308a6f.tar.bz2
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
Diffstat (limited to 'content')
-rw-r--r--content/browser/notification_service_impl.cc5
-rw-r--r--content/public/browser/notification_service.h2
2 files changed, 7 insertions, 0 deletions
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.