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

Side by Side Diff: remoting/webapp/crd/js/desktop_remoting.js

Issue 988963003: Add Application.Delegate.stop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * @fileoverview 6 * @fileoverview
7 * This class implements the functionality that is specific to desktop 7 * This class implements the functionality that is specific to desktop
8 * remoting ("Chromoting" or CRD). 8 * remoting ("Chromoting" or CRD).
9 */ 9 */
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 remoting.DesktopRemoting.prototype.start = function(connector, token) { 127 remoting.DesktopRemoting.prototype.start = function(connector, token) {
128 remoting.identity.getEmail().then( 128 remoting.identity.getEmail().then(
129 function(/** string */ email) { 129 function(/** string */ email) {
130 document.getElementById('current-email').innerText = email; 130 document.getElementById('current-email').innerText = email;
131 document.getElementById('get-started-it2me').disabled = false; 131 document.getElementById('get-started-it2me').disabled = false;
132 document.getElementById('get-started-me2me').disabled = false; 132 document.getElementById('get-started-me2me').disabled = false;
133 }); 133 });
134 }; 134 };
135 135
136 /** 136 /**
137 * No cleanup required for desktop remoting.
138 */
139 remoting.DesktopRemoting.prototype.stop = function() {
140 };
141
142 /**
137 * Report an authentication error to the user. This is called in lieu of start() 143 * Report an authentication error to the user. This is called in lieu of start()
138 * if the user cannot be authenticated or if they decline the app permissions. 144 * if the user cannot be authenticated or if they decline the app permissions.
139 * 145 *
140 * @param {remoting.Error} error The failure reason. 146 * @param {remoting.Error} error The failure reason.
141 */ 147 */
142 remoting.DesktopRemoting.prototype.signInFailed = function(error) { 148 remoting.DesktopRemoting.prototype.signInFailed = function(error) {
143 if (error == remoting.Error.CANCELLED) { 149 remoting.showErrorMessage(error);
144 chrome.app.window.current().close();
145 } else {
146 remoting.showErrorMessage(error);
147 }
148 }; 150 };
149 151
150 /** 152 /**
151 * @return {string} Application product name to be used in UI. 153 * @return {string} Application product name to be used in UI.
152 */ 154 */
153 remoting.DesktopRemoting.prototype.getApplicationName = function() { 155 remoting.DesktopRemoting.prototype.getApplicationName = function() {
154 return chrome.i18n.getMessage(/*i18n-content*/'PRODUCT_NAME'); 156 return chrome.i18n.getMessage(/*i18n-content*/'PRODUCT_NAME');
155 }; 157 };
156 158
157 /** 159 /**
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 l10n.localizeElementFromTag(errorDiv, /** @type {string} */ (errorTag)); 324 l10n.localizeElementFromTag(errorDiv, /** @type {string} */ (errorTag));
323 325
324 var mode = remoting.clientSession ? remoting.desktopConnectedView.getMode() 326 var mode = remoting.clientSession ? remoting.desktopConnectedView.getMode()
325 : this.app_.getSessionConnector().getConnectionMode(); 327 : this.app_.getSessionConnector().getConnectionMode();
326 if (mode == remoting.DesktopConnectedView.Mode.IT2ME) { 328 if (mode == remoting.DesktopConnectedView.Mode.IT2ME) {
327 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME); 329 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME);
328 } else { 330 } else {
329 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); 331 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME);
330 } 332 }
331 }; 333 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698