| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 /** | 6 /** |
| 7 * @fileoverview | 7 * @fileoverview |
| 8 * A class that loads a WCS IQ client and constructs remoting.wcs as a | 8 * A class that loads a WCS IQ client and constructs remoting.wcs as a |
| 9 * wrapper for it. | 9 * wrapper for it. |
| 10 */ | 10 */ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 /** | 24 /** |
| 25 * The WCS client that will be downloaded. This variable is initialized (via | 25 * The WCS client that will be downloaded. This variable is initialized (via |
| 26 * remoting.wcsLoader) by the downloaded Javascript. | 26 * remoting.wcsLoader) by the downloaded Javascript. |
| 27 * @type {remoting.WcsIqClient} | 27 * @type {remoting.WcsIqClient} |
| 28 */ | 28 */ |
| 29 this.wcsIqClient = null; | 29 this.wcsIqClient = null; |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * The id of the script node. | 33 * The id of the script node. |
| 34 * @type {string} | 34 * @private {string} |
| 35 * @private | |
| 36 */ | 35 */ |
| 37 remoting.WcsLoader.prototype.SCRIPT_NODE_ID_ = 'wcs-script-node'; | 36 remoting.WcsLoader.prototype.SCRIPT_NODE_ID_ = 'wcs-script-node'; |
| 38 | 37 |
| 39 /** | 38 /** |
| 40 * Starts loading the WCS IQ client. | 39 * Starts loading the WCS IQ client. |
| 41 * | 40 * |
| 42 * When it's loaded, construct remoting.wcs as a wrapper for it. | 41 * When it's loaded, construct remoting.wcs as a wrapper for it. |
| 43 * When the WCS connection is ready, or on error, call |onReady| or |onError|, | 42 * When the WCS connection is ready, or on error, call |onReady| or |onError|, |
| 44 * respectively. | 43 * respectively. |
| 45 * | 44 * |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 136 } |
| 138 onError(error); | 137 onError(error); |
| 139 } | 138 } |
| 140 }; | 139 }; |
| 141 var parameters = '?access_token=' + encodeURIComponent(token); | 140 var parameters = '?access_token=' + encodeURIComponent(token); |
| 142 xhr.open('GET', | 141 xhr.open('GET', |
| 143 remoting.settings.OAUTH2_API_BASE_URL + '/v1/tokeninfo' + parameters, | 142 remoting.settings.OAUTH2_API_BASE_URL + '/v1/tokeninfo' + parameters, |
| 144 true); | 143 true); |
| 145 xhr.send(null); | 144 xhr.send(null); |
| 146 }; | 145 }; |
| OLD | NEW |