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

Unified Diff: third_party/WebKit/Source/modules/push_messaging/PushManager.h

Issue 1701313002: Partial implementation of subscription restrictions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix module export build issue Created 4 years, 10 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: third_party/WebKit/Source/modules/push_messaging/PushManager.h
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushManager.h b/third_party/WebKit/Source/modules/push_messaging/PushManager.h
index d6d9cfdbb80f1bbfeb8e0b47d7429e6242b8f7d6..a4c0729235085a650b207942c15df41a184a2417 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushManager.h
+++ b/third_party/WebKit/Source/modules/push_messaging/PushManager.h
@@ -6,16 +6,20 @@
#define PushManager_h
#include "bindings/core/v8/ScriptWrappable.h"
+#include "bindings/modules/v8/UnionTypesModules.h"
+#include "modules/ModulesExport.h"
#include "platform/heap/Handle.h"
namespace blink {
+class ExceptionState;
class PushSubscriptionOptions;
class ScriptPromise;
class ScriptState;
class ServiceWorkerRegistration;
+struct WebPushSubscriptionOptions;
-class PushManager final : public GarbageCollected<PushManager>, public ScriptWrappable {
+class MODULES_EXPORT PushManager final : public GarbageCollected<PushManager>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
static PushManager* create(ServiceWorkerRegistration* registration)
@@ -23,12 +27,17 @@ public:
return new PushManager(registration);
}
- ScriptPromise subscribe(ScriptState*, const PushSubscriptionOptions&);
+ ScriptPromise subscribe(ScriptState*, const PushSubscriptionOptions&,
+ ExceptionState&);
ScriptPromise getSubscription(ScriptState*);
- ScriptPromise permissionState(ScriptState*, const PushSubscriptionOptions&);
+ ScriptPromise permissionState(ScriptState*, const PushSubscriptionOptions&,
+ ExceptionState&);
DECLARE_TRACE();
+ static WebPushSubscriptionOptions toWebPushSubscriptionOptions(
+ const PushSubscriptionOptions&, ExceptionState&);
+
private:
explicit PushManager(ServiceWorkerRegistration*);
« no previous file with comments | « third_party/WebKit/Source/modules/modules.gypi ('k') | third_party/WebKit/Source/modules/push_messaging/PushManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698