OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PaymentInstruments_h | 5 #ifndef PaymentInstruments_h |
6 #define PaymentInstruments_h | 6 #define PaymentInstruments_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "components/payments/mojom/payment_app.mojom-blink.h" | 9 #include "components/payments/mojom/payment_app.mojom-blink.h" |
10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 : public GarbageCollected<PaymentInstruments>, | 24 : public GarbageCollected<PaymentInstruments>, |
25 public ScriptWrappable { | 25 public ScriptWrappable { |
26 DEFINE_WRAPPERTYPEINFO(); | 26 DEFINE_WRAPPERTYPEINFO(); |
27 WTF_MAKE_NONCOPYABLE(PaymentInstruments); | 27 WTF_MAKE_NONCOPYABLE(PaymentInstruments); |
28 | 28 |
29 public: | 29 public: |
30 explicit PaymentInstruments(const payments::mojom::blink::PaymentManagerPtr&); | 30 explicit PaymentInstruments(const payments::mojom::blink::PaymentManagerPtr&); |
31 | 31 |
32 ScriptPromise deleteInstrument(ScriptState*, const String& instrument_key); | 32 ScriptPromise deleteInstrument(ScriptState*, const String& instrument_key); |
33 ScriptPromise get(ScriptState*, const String& instrument_key); | 33 ScriptPromise get(ScriptState*, const String& instrument_key); |
34 ScriptPromise keys(ScriptState*); | 34 ScriptPromise keys(); |
35 ScriptPromise has(ScriptState*, const String& instrument_key); | 35 ScriptPromise has(ScriptState*, const String& instrument_key); |
36 ScriptPromise set(ScriptState*, | 36 ScriptPromise set(ScriptState*, |
37 const String& instrument_key, | 37 const String& instrument_key, |
38 const PaymentInstrument& details, | 38 const PaymentInstrument& details, |
39 ExceptionState&); | 39 ExceptionState&); |
40 | 40 |
41 DECLARE_TRACE(); | 41 DECLARE_TRACE(); |
42 | 42 |
43 private: | 43 private: |
44 void onDeletePaymentInstrument(ScriptPromiseResolver*, | 44 void onDeletePaymentInstrument(ScriptPromiseResolver*, |
45 payments::mojom::blink::PaymentHandlerStatus); | 45 payments::mojom::blink::PaymentHandlerStatus); |
46 void onGetPaymentInstrument(ScriptPromiseResolver*, | 46 void onGetPaymentInstrument(ScriptPromiseResolver*, |
47 payments::mojom::blink::PaymentInstrumentPtr, | 47 payments::mojom::blink::PaymentInstrumentPtr, |
48 payments::mojom::blink::PaymentHandlerStatus); | 48 payments::mojom::blink::PaymentHandlerStatus); |
49 void onKeysOfPaymentInstruments(ScriptPromiseResolver*, | |
50 const Vector<String>&, | |
51 payments::mojom::blink::PaymentHandlerStatus); | |
52 void onHasPaymentInstrument(ScriptPromiseResolver*, | 49 void onHasPaymentInstrument(ScriptPromiseResolver*, |
53 payments::mojom::blink::PaymentHandlerStatus); | 50 payments::mojom::blink::PaymentHandlerStatus); |
54 void onSetPaymentInstrument(ScriptPromiseResolver*, | 51 void onSetPaymentInstrument(ScriptPromiseResolver*, |
55 payments::mojom::blink::PaymentHandlerStatus); | 52 payments::mojom::blink::PaymentHandlerStatus); |
56 | 53 |
57 const payments::mojom::blink::PaymentManagerPtr& manager_; | 54 const payments::mojom::blink::PaymentManagerPtr& manager_; |
58 }; | 55 }; |
59 | 56 |
60 } // namespace blink | 57 } // namespace blink |
61 | 58 |
62 #endif // PaymentInstruments_h | 59 #endif // PaymentInstruments_h |
OLD | NEW |