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

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

Issue 2054823002: PaymentRequest: complete() method should take PaymentComplete enum value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: why did I do that? Created 4 years, 6 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 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 PaymentResponse_h 5 #ifndef PaymentResponse_h
6 #define PaymentResponse_h 6 #define PaymentResponse_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 17 matching lines...) Expand all
28 28
29 public: 29 public:
30 PaymentResponse(mojom::blink::PaymentResponsePtr, PaymentCompleter*); 30 PaymentResponse(mojom::blink::PaymentResponsePtr, PaymentCompleter*);
31 virtual ~PaymentResponse(); 31 virtual ~PaymentResponse();
32 32
33 const String& methodName() const { return m_methodName; } 33 const String& methodName() const { return m_methodName; }
34 void totalAmount(CurrencyAmount& result) const { result = m_totalAmount; } 34 void totalAmount(CurrencyAmount& result) const { result = m_totalAmount; }
35 ScriptValue details(ScriptState*, ExceptionState&) const; 35 ScriptValue details(ScriptState*, ExceptionState&) const;
36 PaymentAddress* shippingAddress() const { return m_shippingAddress.get(); } 36 PaymentAddress* shippingAddress() const { return m_shippingAddress.get(); }
37 37
38 ScriptPromise complete(ScriptState*, bool success); 38 ScriptPromise complete(ScriptState*, const String& result = "");
39 39
40 DECLARE_TRACE(); 40 DECLARE_TRACE();
41 41
42 private: 42 private:
43 String m_methodName; 43 String m_methodName;
44 CurrencyAmount m_totalAmount; 44 CurrencyAmount m_totalAmount;
45 String m_stringifiedDetails; 45 String m_stringifiedDetails;
46 Member<PaymentAddress> m_shippingAddress; 46 Member<PaymentAddress> m_shippingAddress;
47 Member<PaymentCompleter> m_paymentCompleter; 47 Member<PaymentCompleter> m_paymentCompleter;
48 }; 48 };
49 49
50 } // namespace blink 50 } // namespace blink
51 51
52 #endif // PaymentResponse_h 52 #endif // PaymentResponse_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698