| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** @suppress {duplicate} */ | 5 /** @suppress {duplicate} */ |
| 6 var remoting = remoting || {}; | 6 var remoting = remoting || {}; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Type definition for the RunApplicationResponse returned by the API. | 9 * Type definition for the RunApplicationResponse returned by the API. |
| 10 * @typedef {{ | 10 * @typedef {{ |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 this.session_ = null; | 87 this.session_ = null; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 /** | 90 /** |
| 91 * @param {string} token | 91 * @param {string} token |
| 92 * @return {Promise<!remoting.Xhr.Response>} | 92 * @return {Promise<!remoting.Xhr.Response>} |
| 93 * @private | 93 * @private |
| 94 */ | 94 */ |
| 95 remoting.AppRemotingActivity.prototype.getAppHostInfo_ = function(token) { | 95 remoting.AppRemotingActivity.prototype.getAppHostInfo_ = function(token) { |
| 96 var url = remoting.settings.APP_REMOTING_API_BASE_URL + '/applications/' + | 96 var url = remoting.settings.APP_REMOTING_API_BASE_URL + '/applications/' + |
| 97 this.app_.getApplicationId() + '/run'; | 97 remoting.settings.getAppRemotingApplicationId() + '/run'; |
| 98 // TODO(kelvinp): Passes |this.subscriptionToken_| to the XHR. | 98 // TODO(kelvinp): Passes |this.subscriptionToken_| to the XHR. |
| 99 return new remoting.AutoRetryXhr({ | 99 return new remoting.AutoRetryXhr({ |
| 100 method: 'POST', | 100 method: 'POST', |
| 101 url: url, | 101 url: url, |
| 102 oauthToken: token | 102 oauthToken: token |
| 103 }).start(); | 103 }).start(); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 /** | 106 /** |
| 107 * @param {!remoting.Xhr.Response} xhrResponse | 107 * @param {!remoting.Xhr.Response} xhrResponse |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 * @private | 261 * @private |
| 262 */ | 262 */ |
| 263 remoting.AppRemotingActivity.prototype.showErrorMessage_ = function(error) { | 263 remoting.AppRemotingActivity.prototype.showErrorMessage_ = function(error) { |
| 264 console.error('Connection failed: ' + error.toString()); | 264 console.error('Connection failed: ' + error.toString()); |
| 265 remoting.MessageWindow.showErrorMessage( | 265 remoting.MessageWindow.showErrorMessage( |
| 266 this.app_.getApplicationName(), | 266 this.app_.getApplicationName(), |
| 267 chrome.i18n.getMessage(error.getTag())); | 267 chrome.i18n.getMessage(error.getTag())); |
| 268 }; | 268 }; |
| 269 | 269 |
| 270 })(); | 270 })(); |
| OLD | NEW |