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

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: Added exception failure return and updated more tests 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..1cfe0a3bf468f1699700c7ca22b6a0008807887f 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushManager.h
+++ b/third_party/WebKit/Source/modules/push_messaging/PushManager.h
@@ -6,6 +6,7 @@
#define PushManager_h
#include "bindings/core/v8/ScriptWrappable.h"
+#include "bindings/modules/v8/UnionTypesModules.h"
#include "platform/heap/Handle.h"
namespace blink {
@@ -14,6 +15,7 @@ class PushSubscriptionOptions;
class ScriptPromise;
class ScriptState;
class ServiceWorkerRegistration;
+struct WebPushSubscriptionOptions;
class PushManager final : public GarbageCollected<PushManager>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
@@ -23,13 +25,20 @@ public:
return new PushManager(registration);
}
- ScriptPromise subscribe(ScriptState*, const PushSubscriptionOptions&);
+ ScriptPromise subscribe(ScriptState*, const PushSubscriptionOptions&,
+ ExceptionState&);
Peter Beverloo 2016/02/26 16:02:33 nit: forward declare
harkness 2016/02/26 17:12:04 Done.
ScriptPromise getSubscription(ScriptState*);
- ScriptPromise permissionState(ScriptState*, const PushSubscriptionOptions&);
+ ScriptPromise permissionState(ScriptState*, const PushSubscriptionOptions&,
+ ExceptionState&);
DECLARE_TRACE();
+ static WebPushSubscriptionOptions toWebPushSubscriptionOptions(
+ const PushSubscriptionOptions&, ExceptionState&);
+
private:
+ static String toString(const ArrayBufferOrArrayBufferView& applicationServerKey,
Peter Beverloo 2016/02/26 16:02:33 nit 1: this should be internal to PushManager.cpp.
harkness 2016/02/26 17:12:04 Done.
+ ExceptionState&);
explicit PushManager(ServiceWorkerRegistration*);
Member<ServiceWorkerRegistration> m_registration;

Powered by Google App Engine
This is Rietveld 408576698