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

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

Issue 1007543003: Implements It2MeBrowserTest CancelShare and VerifyAccessCodeNotReusable (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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 244
245 /** 245 /**
246 * Called when the current session's connection has failed. 246 * Called when the current session's connection has failed.
247 * 247 *
248 * @param {remoting.SessionConnector} connector 248 * @param {remoting.SessionConnector} connector
249 * @param {!remoting.Error} error 249 * @param {!remoting.Error} error
250 * @return {void} Nothing. 250 * @return {void} Nothing.
251 */ 251 */
252 remoting.DesktopRemoting.prototype.handleConnectionFailed = function( 252 remoting.DesktopRemoting.prototype.handleConnectionFailed = function(
253 connector, error) { 253 connector, error) {
254 /** @type {remoting.DesktopRemoting} */ 254 if (error.tag === remoting.Error.Tag.HOST_IS_OFFLINE) {
255 var that = this; 255 var mode = this.app_.getSessionConnector().getConnectionMode();
256 if (mode === remoting.DesktopConnectedView.Mode.IT2ME) {
257 // HOST_IS_OFFLINE during an It2Me connection indicates the host portion
258 // of the access code is invalid, just return INVALID_ACCESS_CODE.
259 // TODO(kelvinp): Move this code to It2MeConnectFlow once it is owned
260 // by remoting.DesktopRemoting.
261 error = remoting.Error.INVALID_ACCESS_CODE;
Jamie 2015/03/13 18:38:47 There are two cases to consider here: where the di
kelvinp 2015/03/13 18:55:25 For case 1) If the directory returns 404, It2MeCon
rmsousa 2015/03/13 22:14:27 HOST_IS_OFFLINE does not indicate that the host po
262 } else if (this.refreshHostJidIfOffline_) {
263 this.refreshHostJidIfOffline_ = false;
264 var that = this;
256 265
257 /** @param {boolean} success */ 266 var onHostListRefresh = function(/** boolean */ success) {
258 var onHostListRefresh = function(success) { 267 if (success) {
259 if (success) { 268 var host = remoting.hostList.getHostForId(connector.getHostId());
260 var host = remoting.hostList.getHostForId(connector.getHostId()); 269 if (host) {
261 if (host) { 270 connector.retryConnectMe2Me(host);
262 connector.retryConnectMe2Me(host); 271 return;
263 return; 272 }
264 } 273 }
274 that.handleError(error);
275 };
276
277 // The plugin will be re-created when the host finished refreshing
278 remoting.hostList.refresh(onHostListRefresh);
279 return;
265 } 280 }
266 that.handleError(error);
267 };
268
269 if (error.tag == remoting.Error.Tag.HOST_IS_OFFLINE &&
270 that.refreshHostJidIfOffline_) {
271 that.refreshHostJidIfOffline_ = false;
272 // The plugin will be re-created when the host finished refreshing
273 remoting.hostList.refresh(onHostListRefresh);
274 } else {
275 this.handleError(error);
276 } 281 }
282 this.handleError(error);
277 }; 283 };
278 284
279 /** 285 /**
280 * Called when the current session has reached the point where the host has 286 * Called when the current session has reached the point where the host has
281 * started streaming video frames to the client. 287 * started streaming video frames to the client.
282 * 288 *
283 * @return {void} Nothing. 289 * @return {void} Nothing.
284 */ 290 */
285 remoting.DesktopRemoting.prototype.handleVideoStreamingStarted = function() { 291 remoting.DesktopRemoting.prototype.handleVideoStreamingStarted = function() {
286 }; 292 };
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } else { 330 } else {
325 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); 331 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME);
326 } 332 }
327 }; 333 };
328 334
329 /** 335 /**
330 * No cleanup required for desktop remoting. 336 * No cleanup required for desktop remoting.
331 */ 337 */
332 remoting.DesktopRemoting.prototype.handleExit = function() { 338 remoting.DesktopRemoting.prototype.handleExit = function() {
333 }; 339 };
OLDNEW
« no previous file with comments | « remoting/webapp/browser_test/it2me_browser_test.js ('k') | testing/chromoting/browser_test_commands_linux.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698