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

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

Issue 2649143003: PaymentRequest: The currencySystem should be non-nullable. (Closed)
Patch Set: PaymentRequest: The currencySystem should be non-nullable. Created 3 years, 10 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
« no previous file with comments | « components/payments/payment_request.mojom ('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/ConditionalFeatures.h" 7 #include "bindings/core/v8/ConditionalFeatures.h"
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 namespace mojo { 58 namespace mojo {
59 59
60 template <> 60 template <>
61 struct TypeConverter<PaymentCurrencyAmountPtr, blink::PaymentCurrencyAmount> { 61 struct TypeConverter<PaymentCurrencyAmountPtr, blink::PaymentCurrencyAmount> {
62 static PaymentCurrencyAmountPtr Convert( 62 static PaymentCurrencyAmountPtr Convert(
63 const blink::PaymentCurrencyAmount& input) { 63 const blink::PaymentCurrencyAmount& input) {
64 PaymentCurrencyAmountPtr output = PaymentCurrencyAmount::New(); 64 PaymentCurrencyAmountPtr output = PaymentCurrencyAmount::New();
65 output->currency = input.currency(); 65 output->currency = input.currency();
66 output->value = input.value(); 66 output->value = input.value();
67 if (input.hasCurrencySystem()) 67 output->currency_system = input.currencySystem();
68 output->currency_system = input.currencySystem();
69 return output; 68 return output;
70 } 69 }
71 }; 70 };
72 71
73 template <> 72 template <>
74 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> { 73 struct TypeConverter<PaymentItemPtr, blink::PaymentItem> {
75 static PaymentItemPtr Convert(const blink::PaymentItem& input) { 74 static PaymentItemPtr Convert(const blink::PaymentItem& input) {
76 PaymentItemPtr output = payments::mojom::blink::PaymentItem::New(); 75 PaymentItemPtr output = payments::mojom::blink::PaymentItem::New();
77 output->label = input.label(); 76 output->label = input.label();
78 output->amount = PaymentCurrencyAmount::From(input.amount()); 77 output->amount = PaymentCurrencyAmount::From(input.amount());
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 m_completeResolver.clear(); 1036 m_completeResolver.clear();
1038 m_showResolver.clear(); 1037 m_showResolver.clear();
1039 m_abortResolver.clear(); 1038 m_abortResolver.clear();
1040 m_canMakePaymentResolver.clear(); 1039 m_canMakePaymentResolver.clear();
1041 if (m_clientBinding.is_bound()) 1040 if (m_clientBinding.is_bound())
1042 m_clientBinding.Close(); 1041 m_clientBinding.Close();
1043 m_paymentProvider.reset(); 1042 m_paymentProvider.reset();
1044 } 1043 }
1045 1044
1046 } // namespace blink 1045 } // namespace blink
OLDNEW
« no previous file with comments | « components/payments/payment_request.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698