| 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 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 class MODULES_EXPORT PaymentInstruments final | 23 class MODULES_EXPORT PaymentInstruments final |
| 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(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(); | 34 ScriptPromise keys(); |
| 35 ScriptPromise has(const String& instrument_key); | 35 ScriptPromise has(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 onSetPaymentInstrument(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 onSetPaymentInstrument(ScriptPromiseResolver*, |
| 50 payments::mojom::blink::PaymentHandlerStatus); |
| 49 | 51 |
| 50 const payments::mojom::blink::PaymentManagerPtr& manager_; | 52 const payments::mojom::blink::PaymentManagerPtr& manager_; |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 } // namespace blink | 55 } // namespace blink |
| 54 | 56 |
| 55 #endif // PaymentInstruments_h | 57 #endif // PaymentInstruments_h |
| OLD | NEW |