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

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

Issue 2449943002: Add pending line item support for web payments. (Closed)
Patch Set: Comments 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
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentItem.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "modules/payments/PaymentRequest.h" 5 #include "modules/payments/PaymentRequest.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/JSONValuesForV8.h" 8 #include "bindings/core/v8/JSONValuesForV8.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 return output; 60 return output;
61 } 61 }
62 }; 62 };
63 63
64 template <> 64 template <>
65 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { 65 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> {
66 static PaymentItemPtr Convert(const blink::PaymentItem& input) { 66 static PaymentItemPtr Convert(const blink::PaymentItem& input) {
67 PaymentItemPtr output = PaymentItem::New(); 67 PaymentItemPtr output = PaymentItem::New();
68 output->label = input.label(); 68 output->label = input.label();
69 output->amount = PaymentCurrencyAmount::From(input.amount()); 69 output->amount = PaymentCurrencyAmount::From(input.amount());
70 output->pending = input.pending();
70 return output; 71 return output;
71 } 72 }
72 }; 73 };
73 74
74 template <> 75 template <>
75 struct TypeConverter<PaymentShippingOptionPtr, blink::PaymentShippingOption> { 76 struct TypeConverter<PaymentShippingOptionPtr, blink::PaymentShippingOption> {
76 static PaymentShippingOptionPtr Convert( 77 static PaymentShippingOptionPtr Convert(
77 const blink::PaymentShippingOption& input) { 78 const blink::PaymentShippingOption& input) {
78 PaymentShippingOptionPtr output = PaymentShippingOption::New(); 79 PaymentShippingOptionPtr output = PaymentShippingOption::New();
79 output->id = input.id(); 80 output->id = input.id();
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 m_completeTimer.stop(); 836 m_completeTimer.stop();
836 m_completeResolver.clear(); 837 m_completeResolver.clear();
837 m_showResolver.clear(); 838 m_showResolver.clear();
838 m_abortResolver.clear(); 839 m_abortResolver.clear();
839 if (m_clientBinding.is_bound()) 840 if (m_clientBinding.is_bound())
840 m_clientBinding.Close(); 841 m_clientBinding.Close();
841 m_paymentProvider.reset(); 842 m_paymentProvider.reset();
842 } 843 }
843 844
844 } // namespace blink 845 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentItem.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698