summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 05:44:26 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 05:44:26 +0000
commit4bb33630869981809c47c36c3c18813d6b005d34 (patch)
tree505252dfeac2de2d02a89d1f7e69ffcdf4affcf5 /chrome/browser/profile.cc
parenta93244407e205a8619d620ce91bafbdf88eab195 (diff)
downloadchromium_src-4bb33630869981809c47c36c3c18813d6b005d34.zip
chromium_src-4bb33630869981809c47c36c3c18813d6b005d34.tar.gz
chromium_src-4bb33630869981809c47c36c3c18813d6b005d34.tar.bz2
Browser side support (sans UI) for desktop notifications.
BUG=none TEST=none Review URL: http://codereview.chromium.org/194108 Review URL: http://codereview.chromium.org/271052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 4508644..87c9713 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/in_process_webkit/webkit_context.h"
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/net/ssl_config_service_manager.h"
+#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/password_manager/password_store_default.h"
#include "chrome/browser/privacy_blacklist/blacklist.h"
#include "chrome/browser/profile_manager.h"
@@ -459,6 +460,10 @@ class OffTheRecordProfileImpl : public Profile,
return profile_->GetBookmarkModel();
}
+ virtual DesktopNotificationService* GetDesktopNotificationService() {
+ return profile_->GetDesktopNotificationService();
+ }
+
virtual ProfileSyncService* GetProfileSyncService() {
return NULL;
}
@@ -1344,6 +1349,17 @@ WebKitContext* ProfileImpl::GetWebKitContext() {
return webkit_context_.get();
}
+DesktopNotificationService* ProfileImpl::GetDesktopNotificationService() {
+ DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ if (!desktop_notification_service_.get()) {
+ // TODO(johnnyg): hook this up with notification UI manager.
+ desktop_notification_service_.reset(new DesktopNotificationService(
+ this, NULL));
+ }
+
+ return desktop_notification_service_.get();
+}
+
void ProfileImpl::MarkAsCleanShutdown() {
if (prefs_.get()) {
// The session cleanly exited, set kSessionExitedCleanly appropriately.