OLD | NEW |
1 /* Copyright 2013 The Chromium Authors. All rights reserved. | 1 /* Copyright 2013 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 * The application side of the application/sandbox WCS interface, used by the | 8 * The application side of the application/sandbox WCS interface, used by the |
9 * application to exchange messages with the sandbox. | 9 * application to exchange messages with the sandbox. |
10 */ | 10 */ |
(...skipping 13 matching lines...) Expand all Loading... |
24 this.sandbox_ = sandbox; | 24 this.sandbox_ = sandbox; |
25 /** @type {?function(string):void} | 25 /** @type {?function(string):void} |
26 * @private */ | 26 * @private */ |
27 this.onConnected_ = null; | 27 this.onConnected_ = null; |
28 /** @type {function(remoting.Error):void} | 28 /** @type {function(remoting.Error):void} |
29 * @private */ | 29 * @private */ |
30 this.onError_ = function(error) {}; | 30 this.onError_ = function(error) {}; |
31 /** @type {?function(string):void} | 31 /** @type {?function(string):void} |
32 * @private */ | 32 * @private */ |
33 this.onIq_ = null; | 33 this.onIq_ = null; |
34 /** @type {Object.<number, XMLHttpRequest>} | 34 /** @type {Object<number, XMLHttpRequest>} |
35 * @private */ | 35 * @private */ |
36 this.pendingXhrs_ = {}; | 36 this.pendingXhrs_ = {}; |
37 /** @private */ | 37 /** @private */ |
38 this.localJid_ = ''; | 38 this.localJid_ = ''; |
39 | 39 |
40 /** @private */ | 40 /** @private */ |
41 this.accessTokenRefreshTimerStarted_ = false; | 41 this.accessTokenRefreshTimerStarted_ = false; |
42 | 42 |
43 window.addEventListener('message', this.onMessage_.bind(this), false); | 43 window.addEventListener('message', this.onMessage_.bind(this), false); |
44 | 44 |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 'xhr': sanitizeXhr_(xhr) | 280 'xhr': sanitizeXhr_(xhr) |
281 }; | 281 }; |
282 this.sandbox_.postMessage(message, '*'); | 282 this.sandbox_.postMessage(message, '*'); |
283 if (xhr.readyState == 4) { | 283 if (xhr.readyState == 4) { |
284 delete this.pendingXhrs_[id]; | 284 delete this.pendingXhrs_[id]; |
285 } | 285 } |
286 } | 286 } |
287 | 287 |
288 /** @type {remoting.WcsSandboxContainer} */ | 288 /** @type {remoting.WcsSandboxContainer} */ |
289 remoting.wcsSandbox = null; | 289 remoting.wcsSandbox = null; |
OLD | NEW |