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

Side by Side Diff: ios/chrome/browser/web/resources/payment_request.js

Issue 2949583002: [Payment Request] window.PaymentRequest must be undefined if PR is disabled (Closed)
Patch Set: Addressed comment Created 3 years, 6 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 | « ios/chrome/browser/web/resources/chrome_bundle.js ('k') | no next file » | 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 /** 5 /**
6 * @fileoverview JavaScript implementation of the Payment Request API. When 6 * @fileoverview JavaScript implementation of the Payment Request API. When
7 * loaded, installs the API onto the window object. Conforms 7 * loaded, installs the API onto the window object. Conforms
8 * to https://www.w3.org/TR/payment-request/. Note: This is a work in progress. 8 * to https://www.w3.org/TR/payment-request/. Note: This is a work in progress.
9 */ 9 */
10 10
11 goog.provide('__crWeb.paymentRequestManager');
12
13 /** 11 /**
14 * This class implements the DOM level 2 EventTarget interface. The 12 * This class implements the DOM level 2 EventTarget interface. The
15 * Implementation is copied form src/ui/webui/resources/js/cr/event_target.js. 13 * Implementation is copied form src/ui/webui/resources/js/cr/event_target.js.
16 * This code should be removed once there is a plan to move event_target.js out 14 * This code should be removed once there is a plan to move event_target.js out
17 * of WebUI and reuse in iOS. 15 * of WebUI and reuse in iOS.
18 * @constructor 16 * @constructor
19 * @implements {EventTarget} 17 * @implements {EventTarget}
20 */ 18 */
21 __gCrWeb.EventTarget = 19 __gCrWeb.EventTarget =
22 function() { 20 function() {
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 } 854 }
857 855
858 var message = { 856 var message = {
859 'command': 'paymentRequest.responseComplete', 857 'command': 'paymentRequest.responseComplete',
860 'result': opt_result, 858 'result': opt_result,
861 }; 859 };
862 __gCrWeb.message.invokeOnHost(message); 860 __gCrWeb.message.invokeOnHost(message);
863 861
864 return __gCrWeb['paymentRequestManager'].responsePromiseResolver.promise; 862 return __gCrWeb['paymentRequestManager'].responsePromiseResolver.promise;
865 }; 863 };
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/resources/chrome_bundle.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698