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

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

Issue 2808573002: PaymentRequest: Change the timer task type. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp » ('j') | 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 <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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698