Index: third_party/WebKit/Source/modules/payments/PaymentInstruments.h |
diff --git a/third_party/WebKit/Source/modules/payments/PaymentInstruments.h b/third_party/WebKit/Source/modules/payments/PaymentInstruments.h |
index c1903ed7519b4b6e7ca26843228e3bab859147d2..3f837e098f28653f5fe7409a3c3682c09d9da108 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentInstruments.h |
+++ b/third_party/WebKit/Source/modules/payments/PaymentInstruments.h |
@@ -6,6 +6,7 @@ |
#define PaymentInstruments_h |
#include "bindings/core/v8/ScriptWrappable.h" |
+#include "components/payments/mojom/payment_app.mojom-blink.h" |
#include "modules/ModulesExport.h" |
#include "platform/heap/Handle.h" |
#include "platform/wtf/Noncopyable.h" |
@@ -13,8 +14,11 @@ |
namespace blink { |
+class ExceptionState; |
class PaymentInstrument; |
class ScriptPromise; |
+class ScriptPromiseResolver; |
+class ScriptState; |
class MODULES_EXPORT PaymentInstruments final |
: public GarbageCollected<PaymentInstruments>, |
@@ -23,16 +27,27 @@ class MODULES_EXPORT PaymentInstruments final |
WTF_MAKE_NONCOPYABLE(PaymentInstruments); |
public: |
- PaymentInstruments(); |
+ explicit PaymentInstruments(const payments::mojom::blink::PaymentManagerPtr&); |
ScriptPromise deleteInstrument(const String& instrument_key); |
- ScriptPromise get(const String& instrument_key); |
+ ScriptPromise get(ScriptState*, const String& instrument_key); |
ScriptPromise keys(); |
ScriptPromise has(const String& instrument_key); |
- ScriptPromise set(const String& instrument_key, |
- const PaymentInstrument& details); |
+ ScriptPromise set(ScriptState*, |
+ const String& instrument_key, |
+ const PaymentInstrument& details, |
+ ExceptionState&); |
DECLARE_TRACE(); |
+ |
+ private: |
+ void onSetPaymentInstrument(ScriptPromiseResolver*, |
+ payments::mojom::blink::PaymentHandlerStatus); |
+ void onGetPaymentInstrument(ScriptPromiseResolver*, |
+ payments::mojom::blink::PaymentInstrumentPtr, |
+ payments::mojom::blink::PaymentHandlerStatus); |
+ |
+ const payments::mojom::blink::PaymentManagerPtr& manager_; |
}; |
} // namespace blink |