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

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

Issue 2790013002: PaymentHandler: Implement set/get methods in PaymentInstruments (blink) (Closed)
Patch Set: blink Created 3 years, 8 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/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
« no previous file with comments | « content/browser/payments/payment_manager.cc ('k') | third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698