| Index: chrome/browser/notifications/desktop_notification_service.h
|
| diff --git a/chrome/browser/notifications/desktop_notification_service.h b/chrome/browser/notifications/desktop_notification_service.h
|
| index 8be6f855c3c2d2f361e58ed44f8a0c15981140e3..c3a41f941c198cba5541059840d607358195b1f5 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);
|
|
|