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

Side by Side Diff: ios/chrome/browser/payments/js_payment_request_manager.h

Issue 2585233003: Upstream Chrome on iOS source code [2/11]. (Closed)
Patch Set: Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_JS_PAYMENT_REQUEST_MANAGER_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_JS_PAYMENT_REQUEST_MANAGER_H_
7
8 #import "ios/web/public/web_state/js/crw_js_injection_manager.h"
9
10 namespace web {
11 class PaymentResponse;
12 }
13
14 // Injects the JavaScript that implements the Payment Request API and provides
15 // an app-side interface for interacting with it.
16 @interface JSPaymentRequestManager : CRWJSInjectionManager
17
18 // Resolves the JavaScript promise associated with the current PaymentRequest
19 // with the a JSON serialization of |paymentResponse|. |completionHandler| will
20 // be invoked after the operation has completed with YES if successful.
21 - (void)resolveRequestPromise:(const web::PaymentResponse&)paymentResponse
22 completionHandler:(void (^)(BOOL))completionHandler;
23
24 // Rejects the JavaScript promise associated with the current PaymentRequest
25 // with the supplied |errorMessage|. |completionHandler| will be invoked after
26 // the operation has completed with YES if successful.
27 - (void)rejectRequestPromise:(NSString*)errorMessage
28 completionHandler:(void (^)(BOOL))completionHandler;
29
30 // Resolves the JavaScript promise associated with the current PaymentResponse.
31 // |completionHandler| will be invoked after the operation has completed with
32 // YES if successful.
33 - (void)resolveResponsePromise:(void (^)(BOOL))completionHandler;
34
35 // Rejects the JavaScript promise associated with the current PaymentResponse
36 // with the supplied |errorMessage|. |completionHandler| will be invoked after
37 // the operation has completed with YES if successful.
38 - (void)rejectResponsePromise:(NSString*)errorMessage
39 completionHandler:(void (^)(BOOL))completionHandler;
40
41 @end
42
43 #endif // IOS_CHROME_BROWSER_PAYMENTS_JS_PAYMENT_REQUEST_MANAGER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/payments/cells/shipping_address_item.mm ('k') | ios/chrome/browser/payments/js_payment_request_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698