| 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 provides an interface to a WCS connection. | 8 * A class that provides an interface to a WCS connection. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 console.error('updateAccessToken: Authentication failed: ' + error); | 58 console.error('updateAccessToken: Authentication failed: ' + error); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * A timer that polls for an updated access token. | 62 * A timer that polls for an updated access token. |
| 63 * @type {number} | 63 * @type {number} |
| 64 * @private | 64 * @private |
| 65 */ | 65 */ |
| 66 this.pollForUpdatedToken_ = setInterval( | 66 this.pollForUpdatedToken_ = setInterval( |
| 67 function() { | 67 function() { |
| 68 remoting.oauth2.callWithToken(updateAccessToken, onError); | 68 remoting.identity.callWithToken(updateAccessToken, onError); |
| 69 }, | 69 }, |
| 70 60 * 1000); | 70 60 * 1000); |
| 71 | 71 |
| 72 /** | 72 /** |
| 73 * A function called when an IQ stanza is received. | 73 * A function called when an IQ stanza is received. |
| 74 * @param {string} stanza The IQ stanza. | 74 * @param {string} stanza The IQ stanza. |
| 75 * @private | 75 * @private |
| 76 */ | 76 */ |
| 77 this.onIq_ = function(stanza) {}; | 77 this.onIq_ = function(stanza) {}; |
| 78 | 78 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 /** | 137 /** |
| 138 * Sets the function called when an IQ stanza is received. | 138 * Sets the function called when an IQ stanza is received. |
| 139 * | 139 * |
| 140 * @param {function(string): void} onIq The function called when an IQ stanza | 140 * @param {function(string): void} onIq The function called when an IQ stanza |
| 141 * is received. | 141 * is received. |
| 142 * @return {void} Nothing. | 142 * @return {void} Nothing. |
| 143 */ | 143 */ |
| 144 remoting.Wcs.prototype.setOnIq = function(onIq) { | 144 remoting.Wcs.prototype.setOnIq = function(onIq) { |
| 145 this.onIq_ = onIq; | 145 this.onIq_ = onIq; |
| 146 }; | 146 }; |
| OLD | NEW |