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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentManager.h

Issue 2946013002: PaymentHandler: Implement requestPermission().
Patch Set: PaymentHandler: Implement requestPermission(). Created 3 years, 6 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/payments/PaymentManager.h
diff --git a/third_party/WebKit/Source/modules/payments/PaymentManager.h b/third_party/WebKit/Source/modules/payments/PaymentManager.h
index 1b32bb3cb819445273022e90d1478374f9e1e4fd..0d79e15a7e6028461f82858b29b5fbef97989679 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentManager.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentManager.h
@@ -10,10 +10,12 @@
#include "platform/bindings/ScriptWrappable.h"
#include "platform/heap/Handle.h"
#include "public/platform/modules/payments/payment_app.mojom-blink.h"
+#include "public/platform/modules/permissions/permission.mojom-blink.h"
namespace blink {
class PaymentInstruments;
+class ScriptPromiseResolver;
class ServiceWorkerRegistration;
class MODULES_EXPORT PaymentManager final
@@ -26,6 +28,7 @@ class MODULES_EXPORT PaymentManager final
static PaymentManager* Create(ServiceWorkerRegistration*);
PaymentInstruments* instruments();
+ ScriptPromise requestPermission(ScriptState*);
DECLARE_TRACE();
@@ -34,8 +37,14 @@ class MODULES_EXPORT PaymentManager final
void OnServiceConnectionError();
+ // For PaymentManager service
+ void OnPermissionRequestComplete(ScriptPromiseResolver*,
+ mojom::blink::PermissionStatus);
+ void OnPermissionServiceConnectionError();
+
Member<ServiceWorkerRegistration> registration_;
payments::mojom::blink::PaymentManagerPtr manager_;
+ mojom::blink::PermissionServicePtr permission_service_;
Member<PaymentInstruments> instruments_;
};
« no previous file with comments | « content/public/browser/permission_type.h ('k') | third_party/WebKit/Source/modules/payments/PaymentManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698