Chromium Code Reviews| 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 133dc40221c93f45fdf9c69842e207ea98dc7a42..29e7cc9635421c7159f3a65ce04aee2c347fab91 100644 |
| --- a/chrome/browser/notifications/desktop_notification_service.h |
| +++ b/chrome/browser/notifications/desktop_notification_service.h |
| @@ -16,6 +16,7 @@ |
| #include "base/prefs/pref_member.h" |
| #include "base/strings/string16.h" |
| #include "chrome/browser/content_settings/content_settings_provider.h" |
| +#include "chrome/browser/content_settings/permission_context_base.h" |
| #include "chrome/browser/notifications/extension_welcome_notification.h" |
| #include "chrome/common/content_settings.h" |
| #include "components/keyed_service/core/keyed_service.h" |
|
Peter Beverloo
2014/07/10 11:29:39
We don't have to include keyed_service.h directly
Miguel Garcia
2014/07/17 17:24:48
Done.
|
| @@ -48,7 +49,7 @@ class PrefRegistrySyncable; |
| // The DesktopNotificationService is an object, owned by the Profile, |
| // which provides the creation of desktop "toasts" to web pages and workers. |
| -class DesktopNotificationService : public KeyedService, |
| +class DesktopNotificationService : public PermissionContextBase, |
| public content::NotificationObserver { |
| public: |
| // Register profile-specific prefs of notifications. |
| @@ -58,12 +59,6 @@ class DesktopNotificationService : public KeyedService, |
| NotificationUIManager* ui_manager); |
| virtual ~DesktopNotificationService(); |
| - // Requests permission for a given origin. |callback| is run when the UI |
| - // finishes. |
| - void RequestPermission(const GURL& origin, |
| - content::RenderFrameHost* render_frame_host, |
| - const base::Closure& callback); |
| - |
| // Show a desktop notification. If |cancel_callback| is non-null, it's set to |
| // a callback which can be used to cancel the notification. |
| void ShowDesktopNotification( |
| @@ -102,22 +97,11 @@ class DesktopNotificationService : public KeyedService, |
| // The default content setting determines how to handle origins that haven't |
| // been allowed or denied yet. If |provider_id| is not NULL, the id of the |
| // provider which provided the default setting is assigned to it. |
| - ContentSetting GetDefaultContentSetting(std::string* provider_id); |
| - void SetDefaultContentSetting(ContentSetting setting); |
| - |
| - // NOTE: This should only be called on the UI thread. |
| - void ResetToDefaultContentSetting(); |
| // Returns all notifications settings. |settings| is cleared before |
| // notifications setting are passed to it. |
| void GetNotificationsSettings(ContentSettingsForOneType* settings); |
| - // Clears the notifications setting for the given pattern. |
| - void ClearSetting(const ContentSettingsPattern& pattern); |
| - |
| - // Clears the sets of explicitly allowed and denied origins. |
| - void ResetAllOrigins(); |
| - |
| ContentSetting GetContentSetting(const GURL& origin); |
| // Returns true if the notifier with |notifier_id| is allowed to send |
| @@ -139,9 +123,6 @@ class DesktopNotificationService : public KeyedService, |
| base::string16 DisplayNameForOriginInProcessId(const GURL& origin, |
| int process_id); |
| - // Notifies the observers when permissions settings change. |
| - void NotifySettingsChange(); |
| - |
| NotificationUIManager* GetUIManager(); |
| // Called when the string list pref has been changed. |