Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4973)

Unified Diff: chrome/browser/notifications/desktop_notification_service.h

Issue 622793002: Group the different permission related methods in the content api. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 e323d1a53067e8675b74d1793da64a44ebc86df5..8ffd480070fdf4d0db4166e1e1b81dd1621414d4 100644
--- a/chrome/browser/notifications/desktop_notification_service.h
+++ b/chrome/browser/notifications/desktop_notification_service.h
@@ -54,10 +54,6 @@ namespace user_prefs {
class PrefRegistrySyncable;
}
-// Callback to be invoked when the result of a permission request is known.
-typedef base::Callback<void(blink::WebNotificationPermission)>
- NotificationPermissionCallback;
-
// The DesktopNotificationService is an object, owned by the Profile,
// which provides the creation of desktop "toasts" to web pages and workers.
class DesktopNotificationService : public PermissionContextBase
@@ -89,7 +85,7 @@ class DesktopNotificationService : public PermissionContextBase
const PermissionRequestID& request_id,
const GURL& requesting_origin,
bool user_gesture,
- const NotificationPermissionCallback& callback);
+ const base::Callback<void(bool)>& result_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.
@@ -121,12 +117,6 @@ class DesktopNotificationService : public PermissionContextBase
// Called when the disabled_extension_id pref has been changed.
void OnDisabledExtensionIdsChanged();
- // Used as a callback once a permission has been decided to convert |allowed|
- // to one of the blink::WebNotificationPermission values.
- void OnNotificationPermissionRequested(
- const base::Callback<void(blink::WebNotificationPermission)>& callback,
- bool allowed);
-
void FirePermissionLevelChangedEvent(
const message_center::NotifierId& notifier_id,
bool enabled);
@@ -165,8 +155,6 @@ class DesktopNotificationService : public PermissionContextBase
extension_registry_observer_;
#endif
- base::WeakPtrFactory<DesktopNotificationService> weak_factory_;
-
DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService);
};

Powered by Google App Engine
This is Rietveld 408576698