| Index: public/platform/modules/notifications/WebNotificationManager.h
|
| diff --git a/public/platform/modules/notifications/WebNotificationManager.h b/public/platform/modules/notifications/WebNotificationManager.h
|
| index 110c2bf7d654cac2e62c77e4afe525570c89eaf8..d1a57ffda7d28d59a1d3057d629879bb91186f03 100644
|
| --- a/public/platform/modules/notifications/WebNotificationManager.h
|
| +++ b/public/platform/modules/notifications/WebNotificationManager.h
|
| @@ -6,6 +6,7 @@
|
| #define WebNotificationManager_h
|
|
|
| #include "public/platform/WebCallbacks.h"
|
| +#include "public/platform/WebSerializedOrigin.h"
|
| #include "public/platform/WebString.h"
|
| #include "public/platform/WebVector.h"
|
| #include "public/platform/modules/notifications/WebNotificationData.h"
|
| @@ -15,7 +16,7 @@
|
| namespace blink {
|
|
|
| class WebNotificationDelegate;
|
| -class WebSerializedOrigin;
|
| +class WebSecurityOrigin;
|
| class WebServiceWorkerRegistration;
|
|
|
| // Structure representing the info associated with a persistent notification.
|
| @@ -34,12 +35,24 @@ public:
|
|
|
| // Shows a page notification on the user's system. These notifications will have their
|
| // events delivered to the delegate specified in this call.
|
| - virtual void show(const WebSerializedOrigin&, const WebNotificationData&, WebNotificationDelegate*) = 0;
|
| + //
|
| + // TODO(mkwst): Drop the WebSerializedOrigin version once Chromium is updated: https://crbug.com/508896
|
| + virtual void show(const WebSecurityOrigin& origin, const WebNotificationData& data, WebNotificationDelegate* delegate)
|
| + {
|
| + show(WebSerializedOrigin(origin), data, delegate);
|
| + }
|
| + virtual void show(const WebSerializedOrigin&, const WebNotificationData&, WebNotificationDelegate*) {}
|
|
|
| // Shows a persistent notification on the user's system. These notifications will have
|
| // their events delivered to a Service Worker rather than the object's delegate. Will
|
| // take ownership of the WebNotificationShowCallbacks object.
|
| - virtual void showPersistent(const WebSerializedOrigin&, const WebNotificationData&, WebServiceWorkerRegistration*, WebNotificationShowCallbacks*) = 0;
|
| + //
|
| + // TODO(mkwst): Drop the WebSerializedOrigin version once Chromium is updated: https://crbug.com/508896
|
| + virtual void showPersistent(const WebSecurityOrigin& origin, const WebNotificationData& data, WebServiceWorkerRegistration* registration, WebNotificationShowCallbacks* callbacks)
|
| + {
|
| + showPersistent(WebSerializedOrigin(origin), data, registration, callbacks);
|
| + }
|
| + virtual void showPersistent(const WebSerializedOrigin&, const WebNotificationData&, WebServiceWorkerRegistration*, WebNotificationShowCallbacks*) {}
|
|
|
| // Asynchronously gets the persistent notifications belonging to the Service Worker Registration.
|
| // If |filterTag| is not an empty string, only the notification with the given tag will be
|
| @@ -50,14 +63,26 @@ public:
|
| virtual void close(WebNotificationDelegate*) = 0;
|
|
|
| // Closes a persistent notification identified by its persistent notification Id.
|
| - virtual void closePersistent(const WebSerializedOrigin&, int64_t persistentNotificationId) = 0;
|
| + //
|
| + // TODO(mkwst): Drop the WebSerializedOrigin version once Chromium is updated: https://crbug.com/508896
|
| + virtual void closePersistent(const WebSecurityOrigin& origin, int64_t persistentNotificationId)
|
| + {
|
| + closePersistent(WebSerializedOrigin(origin), persistentNotificationId);
|
| + }
|
| + virtual void closePersistent(const WebSerializedOrigin&, int64_t persistentNotificationId) {}
|
|
|
| // Indicates that the delegate object is being destroyed, and must no longer
|
| // be used by the embedder to dispatch events.
|
| virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0;
|
|
|
| // Synchronously checks the permission level for the given origin.
|
| - virtual WebNotificationPermission checkPermission(const WebSerializedOrigin&) = 0;
|
| + //
|
| + // TODO(mkwst): Drop the WebSerializedOrigin version once Chromium is updated: https://crbug.com/508896
|
| + virtual WebNotificationPermission checkPermission(const WebSecurityOrigin& origin)
|
| + {
|
| + return checkPermission(WebSerializedOrigin(origin));
|
| + }
|
| + virtual WebNotificationPermission checkPermission(const WebSerializedOrigin&) { return WebNotificationPermissionDenied; }
|
| };
|
|
|
| } // namespace blink
|
|
|