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 19 matching lines...) Expand all Loading... |
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(ScriptState*); |
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 ScriptPromise clear(ScriptState*); |
40 | 41 |
41 DECLARE_TRACE(); | 42 DECLARE_TRACE(); |
42 | 43 |
43 private: | 44 private: |
44 void onDeletePaymentInstrument(ScriptPromiseResolver*, | 45 void onDeletePaymentInstrument(ScriptPromiseResolver*, |
45 payments::mojom::blink::PaymentHandlerStatus); | 46 payments::mojom::blink::PaymentHandlerStatus); |
46 void onGetPaymentInstrument(ScriptPromiseResolver*, | 47 void onGetPaymentInstrument(ScriptPromiseResolver*, |
47 payments::mojom::blink::PaymentInstrumentPtr, | 48 payments::mojom::blink::PaymentInstrumentPtr, |
48 payments::mojom::blink::PaymentHandlerStatus); | 49 payments::mojom::blink::PaymentHandlerStatus); |
49 void onKeysOfPaymentInstruments(ScriptPromiseResolver*, | 50 void onKeysOfPaymentInstruments(ScriptPromiseResolver*, |
50 const Vector<String>&, | 51 const Vector<String>&, |
51 payments::mojom::blink::PaymentHandlerStatus); | 52 payments::mojom::blink::PaymentHandlerStatus); |
52 void onHasPaymentInstrument(ScriptPromiseResolver*, | 53 void onHasPaymentInstrument(ScriptPromiseResolver*, |
53 payments::mojom::blink::PaymentHandlerStatus); | 54 payments::mojom::blink::PaymentHandlerStatus); |
54 void onSetPaymentInstrument(ScriptPromiseResolver*, | 55 void onSetPaymentInstrument(ScriptPromiseResolver*, |
55 payments::mojom::blink::PaymentHandlerStatus); | 56 payments::mojom::blink::PaymentHandlerStatus); |
| 57 void onClearPaymentInstruments(ScriptPromiseResolver*, |
| 58 payments::mojom::blink::PaymentHandlerStatus); |
56 | 59 |
57 const payments::mojom::blink::PaymentManagerPtr& manager_; | 60 const payments::mojom::blink::PaymentManagerPtr& manager_; |
58 }; | 61 }; |
59 | 62 |
60 } // namespace blink | 63 } // namespace blink |
61 | 64 |
62 #endif // PaymentInstruments_h | 65 #endif // PaymentInstruments_h |
OLD | NEW |