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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.h

Issue 2470463002: Add data parameter to payment details modifier. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 PaymentRequest_h 5 #ifndef PaymentRequest_h
6 #define PaymentRequest_h 6 #define PaymentRequest_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const PaymentDetails&, 50 const PaymentDetails&,
51 ExceptionState&); 51 ExceptionState&);
52 static PaymentRequest* create(ScriptState*, 52 static PaymentRequest* create(ScriptState*,
53 const HeapVector<PaymentMethodData>&, 53 const HeapVector<PaymentMethodData>&,
54 const PaymentDetails&, 54 const PaymentDetails&,
55 const PaymentOptions&, 55 const PaymentOptions&,
56 ExceptionState&); 56 ExceptionState&);
57 57
58 virtual ~PaymentRequest(); 58 virtual ~PaymentRequest();
59 59
60 struct MethodData {
61 MethodData(const Vector<String>& methods, const String& data)
62 : supportedMethods(methods), stringifiedData(data) {}
63 Vector<String> supportedMethods;
64 String stringifiedData;
65 };
66
67 ScriptPromise show(ScriptState*); 60 ScriptPromise show(ScriptState*);
68 ScriptPromise abort(ScriptState*); 61 ScriptPromise abort(ScriptState*);
69 62
70 PaymentAddress* getShippingAddress() const { return m_shippingAddress.get(); } 63 PaymentAddress* getShippingAddress() const { return m_shippingAddress.get(); }
71 const String& shippingOption() const { return m_shippingOption; } 64 const String& shippingOption() const { return m_shippingOption; }
72 const String& shippingType() const { return m_shippingType; } 65 const String& shippingType() const { return m_shippingType; }
73 66
74 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingaddresschange); 67 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingaddresschange);
75 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingoptionchange); 68 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingoptionchange);
76 69
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 Member<ScriptPromiseResolver> m_completeResolver; 116 Member<ScriptPromiseResolver> m_completeResolver;
124 Member<ScriptPromiseResolver> m_abortResolver; 117 Member<ScriptPromiseResolver> m_abortResolver;
125 mojom::blink::PaymentRequestPtr m_paymentProvider; 118 mojom::blink::PaymentRequestPtr m_paymentProvider;
126 mojo::Binding<mojom::blink::PaymentRequestClient> m_clientBinding; 119 mojo::Binding<mojom::blink::PaymentRequestClient> m_clientBinding;
127 Timer<PaymentRequest> m_completeTimer; 120 Timer<PaymentRequest> m_completeTimer;
128 }; 121 };
129 122
130 } // namespace blink 123 } // namespace blink
131 124
132 #endif // PaymentRequest_h 125 #endif // PaymentRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698