summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/desktop_notification_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/notifications/desktop_notification_service.h')
-rw-r--r--chrome/browser/notifications/desktop_notification_service.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/notifications/desktop_notification_service.h b/chrome/browser/notifications/desktop_notification_service.h
index 8be6f85..c3a41f9 100644
--- a/chrome/browser/notifications/desktop_notification_service.h
+++ b/chrome/browser/notifications/desktop_notification_service.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "chrome/browser/notifications/notification.h"
+#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_service.h"
#include "googleurl/src/gurl.h"
@@ -21,7 +22,7 @@ class Task;
// The DesktopNotificationService is an object, owned by the Profile,
// which provides the creation of desktop "toasts" to web pages and workers.
-class DesktopNotificationService {
+class DesktopNotificationService : public NotificationObserver {
public:
enum DesktopNotificationSource {
PageNotification,
@@ -69,6 +70,11 @@ class DesktopNotificationService {
void GrantPermission(const GURL& origin);
void DenyPermission(const GURL& origin);
+ // NotificationObserver implementation.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
NotificationsPrefsCache* prefs_cache() { return prefs_cache_; }
// Creates a data:xxxx URL which contains the full HTML for a notification
@@ -78,6 +84,8 @@ class DesktopNotificationService {
const string16& body);
private:
void InitPrefs();
+ void StartObserving();
+ void StopObserving();
// Save a permission change to the profile.
void PersistPermissionChange(const GURL& origin, bool is_allowed);