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

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

Issue 2848243004: Clean up bindings/core/v8 (Part 2) (Closed)
Patch Set: Rebase Created 3 years, 7 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 #include "modules/payments/PaymentAppRequestConversion.h" 5 #include "modules/payments/PaymentAppRequestConversion.h"
6 6
7 #include "bindings/core/v8/ScriptState.h"
8 #include "bindings/core/v8/ToV8ForCore.h" 7 #include "bindings/core/v8/ToV8ForCore.h"
9 #include "modules/payments/PaymentAppRequest.h" 8 #include "modules/payments/PaymentAppRequest.h"
10 #include "modules/payments/PaymentCurrencyAmount.h" 9 #include "modules/payments/PaymentCurrencyAmount.h"
11 #include "modules/payments/PaymentDetailsModifier.h" 10 #include "modules/payments/PaymentDetailsModifier.h"
12 #include "modules/payments/PaymentItem.h" 11 #include "modules/payments/PaymentItem.h"
13 #include "modules/payments/PaymentMethodData.h" 12 #include "modules/payments/PaymentMethodData.h"
13 #include "platform/bindings/ScriptState.h"
14 #include "public/platform/modules/payments/WebPaymentAppRequest.h" 14 #include "public/platform/modules/payments/WebPaymentAppRequest.h"
15 #include "public/platform/modules/payments/WebPaymentMethodData.h" 15 #include "public/platform/modules/payments/WebPaymentMethodData.h"
16 16
17 namespace blink { 17 namespace blink {
18 namespace { 18 namespace {
19 19
20 PaymentCurrencyAmount ToPaymentCurrencyAmount( 20 PaymentCurrencyAmount ToPaymentCurrencyAmount(
21 const WebPaymentCurrencyAmount& web_amount) { 21 const WebPaymentCurrencyAmount& web_amount) {
22 PaymentCurrencyAmount amount; 22 PaymentCurrencyAmount amount;
23 amount.setCurrency(web_amount.currency); 23 amount.setCurrency(web_amount.currency);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 app_request.setTotal(ToPaymentItem(web_app_request.total)); 103 app_request.setTotal(ToPaymentItem(web_app_request.total));
104 HeapVector<PaymentDetailsModifier> modifiers; 104 HeapVector<PaymentDetailsModifier> modifiers;
105 for (const auto& modifier : web_app_request.modifiers) { 105 for (const auto& modifier : web_app_request.modifiers) {
106 modifiers.push_back(ToPaymentDetailsModifier(script_state, modifier)); 106 modifiers.push_back(ToPaymentDetailsModifier(script_state, modifier));
107 } 107 }
108 app_request.setOptionId(web_app_request.option_id); 108 app_request.setOptionId(web_app_request.option_id);
109 return app_request; 109 return app_request;
110 } 110 }
111 111
112 } // namespace blink 112 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698