| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
| 10 #include "bindings/core/v8/ScriptPromiseResolver.h" | 10 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 11 #include "bindings/core/v8/V8StringResource.h" | 11 #include "bindings/core/v8/V8StringResource.h" |
| 12 #include "bindings/modules/v8/V8AndroidPayMethodData.h" | 12 #include "bindings/modules/v8/V8AndroidPayMethodData.h" |
| 13 #include "bindings/modules/v8/V8BasicCardRequest.h" | 13 #include "bindings/modules/v8/V8BasicCardRequest.h" |
| 14 #include "bindings/modules/v8/V8PaymentDetailsUpdate.h" | 14 #include "bindings/modules/v8/V8PaymentDetailsUpdate.h" |
| 15 #include "core/EventTypeNames.h" | 15 #include "core/EventTypeNames.h" |
| 16 #include "core/dom/DOMException.h" | 16 #include "core/dom/DOMException.h" |
| 17 #include "core/dom/Document.h" | 17 #include "core/dom/Document.h" |
| 18 #include "core/dom/ExceptionCode.h" | 18 #include "core/dom/ExceptionCode.h" |
| 19 #include "core/dom/TaskRunnerHelper.h" | 19 #include "core/dom/TaskRunnerHelper.h" |
| 20 #include "core/events/Event.h" | 20 #include "core/events/Event.h" |
| 21 #include "core/events/EventQueue.h" | 21 #include "core/events/EventQueue.h" |
| 22 #include "core/frame/Deprecation.h" |
| 22 #include "core/frame/FrameOwner.h" | 23 #include "core/frame/FrameOwner.h" |
| 23 #include "core/frame/UseCounter.h" | |
| 24 #include "core/html/HTMLIFrameElement.h" | 24 #include "core/html/HTMLIFrameElement.h" |
| 25 #include "core/inspector/ConsoleMessage.h" | 25 #include "core/inspector/ConsoleMessage.h" |
| 26 #include "core/inspector/ConsoleTypes.h" | 26 #include "core/inspector/ConsoleTypes.h" |
| 27 #include "modules/EventTargetModulesNames.h" | 27 #include "modules/EventTargetModulesNames.h" |
| 28 #include "modules/payments/AndroidPayMethodData.h" | 28 #include "modules/payments/AndroidPayMethodData.h" |
| 29 #include "modules/payments/AndroidPayTokenization.h" | 29 #include "modules/payments/AndroidPayTokenization.h" |
| 30 #include "modules/payments/BasicCardRequest.h" | 30 #include "modules/payments/BasicCardRequest.h" |
| 31 #include "modules/payments/HTMLIFrameElementPayments.h" | 31 #include "modules/payments/HTMLIFrameElementPayments.h" |
| 32 #include "modules/payments/PaymentAddress.h" | 32 #include "modules/payments/PaymentAddress.h" |
| 33 #include "modules/payments/PaymentDetailsInit.h" | 33 #include "modules/payments/PaymentDetailsInit.h" |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 } | 432 } |
| 433 if (RuntimeEnabledFeatures::paymentRequestBasicCardEnabled() && | 433 if (RuntimeEnabledFeatures::paymentRequestBasicCardEnabled() && |
| 434 supported_methods.Contains("basic-card")) { | 434 supported_methods.Contains("basic-card")) { |
| 435 SetBasicCardMethodData(input, output, execution_context, exception_state); | 435 SetBasicCardMethodData(input, output, execution_context, exception_state); |
| 436 if (exception_state.HadException()) | 436 if (exception_state.HadException()) |
| 437 exception_state.ClearException(); | 437 exception_state.ClearException(); |
| 438 } | 438 } |
| 439 | 439 |
| 440 for (size_t i = 0; i < arraysize(kBasicCardNetworks); ++i) { | 440 for (size_t i = 0; i < arraysize(kBasicCardNetworks); ++i) { |
| 441 if (supported_methods.Contains(kBasicCardNetworks[i].name)) { | 441 if (supported_methods.Contains(kBasicCardNetworks[i].name)) { |
| 442 UseCounter::Count( | 442 Deprecation::CountDeprecation( |
| 443 &execution_context, | 443 &execution_context, |
| 444 UseCounter::kPaymentRequestNetworkNameInSupportedMethods); | 444 UseCounter::kPaymentRequestNetworkNameInSupportedMethods); |
| 445 break; | 445 break; |
| 446 } | 446 } |
| 447 } | 447 } |
| 448 } | 448 } |
| 449 | 449 |
| 450 void ValidateAndConvertPaymentDetailsModifiers( | 450 void ValidateAndConvertPaymentDetailsModifiers( |
| 451 const HeapVector<PaymentDetailsModifier>& input, | 451 const HeapVector<PaymentDetailsModifier>& input, |
| 452 Vector<PaymentDetailsModifierPtr>& output, | 452 Vector<PaymentDetailsModifierPtr>& output, |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 complete_resolver_.Clear(); | 1087 complete_resolver_.Clear(); |
| 1088 show_resolver_.Clear(); | 1088 show_resolver_.Clear(); |
| 1089 abort_resolver_.Clear(); | 1089 abort_resolver_.Clear(); |
| 1090 can_make_payment_resolver_.Clear(); | 1090 can_make_payment_resolver_.Clear(); |
| 1091 if (client_binding_.is_bound()) | 1091 if (client_binding_.is_bound()) |
| 1092 client_binding_.Close(); | 1092 client_binding_.Close(); |
| 1093 payment_provider_.reset(); | 1093 payment_provider_.reset(); |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 } // namespace blink | 1096 } // namespace blink |
| OLD | NEW |