| 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 /** | 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 Loading... |
| 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 }; |
| OLD | NEW |