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

Unified Diff: ios/chrome/browser/payments/js_payment_request_manager.h

Issue 2632463003: Add a timeout if the page doesn't call complete() in a timely fashion. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/payments/js_payment_request_manager.h
diff --git a/ios/chrome/browser/payments/js_payment_request_manager.h b/ios/chrome/browser/payments/js_payment_request_manager.h
index 812858aa880c76051d748e727c7b9edf1a1524af..3b7f3f19ec4c6f0237b2588f48f11b20050031f3 100644
--- a/ios/chrome/browser/payments/js_payment_request_manager.h
+++ b/ios/chrome/browser/payments/js_payment_request_manager.h
@@ -15,6 +15,10 @@ class PaymentResponse;
// an app-side interface for interacting with it.
@interface JSPaymentRequestManager : CRWJSInjectionManager
+// Execute a JS noop function. This is used to work around an issue where the JS
lpromero 2017/01/13 10:24:29 Executes
Justin Donnelly 2017/01/18 21:01:31 Done.
+// event queue is blocked while presenting the Payment Request UI.
+- (void)executeNoop;
+
// Resolves the JavaScript promise associated with the current PaymentRequest
// with the a JSON serialization of |paymentResponse|. |completionHandler| will
// be invoked after the operation has completed with YES if successful.
@@ -32,11 +36,9 @@ class PaymentResponse;
// YES if successful.
- (void)resolveResponsePromise:(void (^)(BOOL))completionHandler;
-// Rejects the JavaScript promise associated with the current PaymentResponse
-// with the supplied |errorMessage|. |completionHandler| will be invoked after
-// the operation has completed with YES if successful.
-- (void)rejectResponsePromise:(NSString*)errorMessage
- completionHandler:(void (^)(BOOL))completionHandler;
+// Note that there is no rejectResponsePromise method because the spec includes
+// no provision for rejecting the response promise. User agents are directed to
+// always resolve the promise.
@end

Powered by Google App Engine
This is Rietveld 408576698