Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: remoting/webapp/app_remoting/js/app_remoting_activity.js

Issue 1179873005: [AppRemoting] Break out AppRemoting shared module (re-land). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 remoting.settings.getAppRemotingApplicationId() + '/run'; 97 this.app_.getApplicationId() + '/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
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 })();
OLDNEW
« no previous file with comments | « remoting/webapp/app_remoting/js/app_remoting.js ('k') | remoting/webapp/app_remoting/js/application_context_menu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698