diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-18 01:37:28 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-18 01:37:28 +0000 |
commit | cb0612ea5b10d6003de853d0339869df5adcc985 (patch) | |
tree | 8c35892981e70a57095fa39b5ac88cfca055172b /chrome/browser/notifications/desktop_notification_service.h | |
parent | 73b18974f1241da48074c495b261429bff751a4a (diff) | |
download | chromium_src-cb0612ea5b10d6003de853d0339869df5adcc985.zip chromium_src-cb0612ea5b10d6003de853d0339869df5adcc985.tar.gz chromium_src-cb0612ea5b10d6003de853d0339869df5adcc985.tar.bz2 |
When an extension is uninstalled, close all desktop notifications from that extension.
This change also refactors the balloon collection code to remove duplication between chrome and chromeos.
Removes some gross removal code which was using fake notifications just to get the right ID.
BUG=58266
TEST=open notifications from extension, uninstall extensions
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=65879
Review URL: http://codereview.chromium.org/4635007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/desktop_notification_service.h')
-rw-r--r-- | chrome/browser/notifications/desktop_notification_service.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/notifications/desktop_notification_service.h b/chrome/browser/notifications/desktop_notification_service.h index d92d7e6..53fa56f 100644 --- a/chrome/browser/notifications/desktop_notification_service.h +++ b/chrome/browser/notifications/desktop_notification_service.h @@ -6,24 +6,24 @@ #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ #pragma once +#include <string> #include <vector> #include "base/basictypes.h" +#include "base/ref_counted.h" #include "base/string16.h" -#include "chrome/browser/notifications/notification.h" #include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/common/content_settings.h" #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" -#include "chrome/common/notification_service.h" #include "googleurl/src/gurl.h" #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" +class Notification; class NotificationUIManager; class NotificationsPrefsCache; class PrefService; class Profile; -class Task; class TabContents; struct ViewHostMsg_ShowNotification_Params; @@ -121,6 +121,8 @@ class DesktopNotificationService : public NotificationObserver { void StartObserving(); void StopObserving(); + void OnPrefsChanged(const std::string& pref_name); + // Takes a notification object and shows it in the UI. void ShowNotification(const Notification& notification); @@ -143,7 +145,8 @@ class DesktopNotificationService : public NotificationObserver { // UI for desktop toasts. NotificationUIManager* ui_manager_; - PrefChangeRegistrar registrar_; + PrefChangeRegistrar prefs_registrar_; + NotificationRegistrar notification_registrar_; DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); }; |