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" |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
847 } | 847 } |
848 | 848 |
849 PaymentRequest::PaymentRequest(ExecutionContext* executionContext, | 849 PaymentRequest::PaymentRequest(ExecutionContext* executionContext, |
850 const HeapVector<PaymentMethodData>& methodData, | 850 const HeapVector<PaymentMethodData>& methodData, |
851 const PaymentDetailsInit& details, | 851 const PaymentDetailsInit& details, |
852 const PaymentOptions& options, | 852 const PaymentOptions& options, |
853 ExceptionState& exceptionState) | 853 ExceptionState& exceptionState) |
854 : ContextLifecycleObserver(executionContext), | 854 : ContextLifecycleObserver(executionContext), |
855 m_options(options), | 855 m_options(options), |
856 m_clientBinding(this), | 856 m_clientBinding(this), |
857 m_completeTimer(TaskRunnerHelper::get(TaskType::MiscPlatformAPI, frame()), | 857 m_completeTimer(TaskRunnerHelper::get(TaskType::UserInteraction, frame()), |
please use gerrit instead
2017/04/10 15:35:06
Please don't change this line.
According to the s
zino
2017/04/10 16:11:12
I was confused here: User accepts the payment requ
please use gerrit instead
2017/04/10 16:12:52
We cannot keep MiscPlatformAPI task type?
| |
858 this, | 858 this, |
859 &PaymentRequest::onCompleteTimeout) { | 859 &PaymentRequest::onCompleteTimeout) { |
860 Vector<payments::mojom::blink::PaymentMethodDataPtr> validatedMethodData; | 860 Vector<payments::mojom::blink::PaymentMethodDataPtr> validatedMethodData; |
861 validateAndConvertPaymentMethodData(methodData, validatedMethodData, | 861 validateAndConvertPaymentMethodData(methodData, validatedMethodData, |
862 *getExecutionContext(), exceptionState); | 862 *getExecutionContext(), exceptionState); |
863 if (exceptionState.hadException()) | 863 if (exceptionState.hadException()) |
864 return; | 864 return; |
865 | 865 |
866 if (!getExecutionContext()->isSecureContext()) { | 866 if (!getExecutionContext()->isSecureContext()) { |
867 exceptionState.throwSecurityError("Must be in a secure context"); | 867 exceptionState.throwSecurityError("Must be in a secure context"); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1072 m_completeResolver.clear(); | 1072 m_completeResolver.clear(); |
1073 m_showResolver.clear(); | 1073 m_showResolver.clear(); |
1074 m_abortResolver.clear(); | 1074 m_abortResolver.clear(); |
1075 m_canMakePaymentResolver.clear(); | 1075 m_canMakePaymentResolver.clear(); |
1076 if (m_clientBinding.is_bound()) | 1076 if (m_clientBinding.is_bound()) |
1077 m_clientBinding.Close(); | 1077 m_clientBinding.Close(); |
1078 m_paymentProvider.reset(); | 1078 m_paymentProvider.reset(); |
1079 } | 1079 } |
1080 | 1080 |
1081 } // namespace blink | 1081 } // namespace blink |
OLD | NEW |