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

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

Issue 2946013002: PaymentHandler: Implement requestPermission().
Patch Set: 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..62c00624b0263e8dbf82b2c6c51a713a11b54475 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,16 +28,23 @@ class MODULES_EXPORT PaymentManager final
static PaymentManager* Create(ServiceWorkerRegistration*);
PaymentInstruments* instruments();
+ ScriptPromise requestPermission(ScriptState*);
DECLARE_TRACE();
private:
explicit PaymentManager(ServiceWorkerRegistration*);
+ // For PaymentManager service
please use gerrit instead 2017/06/20 13:28:09 Should this comment be for the next method?
zino 2017/06/22 17:26:47 Done.
void OnServiceConnectionError();
+ void OnPermissionRequestComplete(ScriptPromiseResolver*,
+ mojom::blink::PermissionStatus);
+ void OnPermissionServiceConnectionError();
+
Member<ServiceWorkerRegistration> registration_;
payments::mojom::blink::PaymentManagerPtr manager_;
+ mojom::blink::PermissionServicePtr permission_service_;
Member<PaymentInstruments> instruments_;
};

Powered by Google App Engine
This is Rietveld 408576698