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

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: Rebase 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 /** 256 /**
257 * Called when the current session's connection has failed. 257 * Called when the current session's connection has failed.
258 * 258 *
259 * @param {remoting.SessionConnector} connector 259 * @param {remoting.SessionConnector} connector
260 * @param {!remoting.Error} error 260 * @param {!remoting.Error} error
261 * @return {void} Nothing. 261 * @return {void} Nothing.
262 */ 262 */
263 remoting.DesktopRemoting.prototype.handleConnectionFailed = function( 263 remoting.DesktopRemoting.prototype.handleConnectionFailed = function(
264 connector, error) { 264 connector, error) {
265 /** @type {remoting.DesktopRemoting} */
266 var that = this; 265 var that = this;
267 266 var onHostListRefresh = function(/** boolean */ success) {
268 /** @param {boolean} success */
269 var onHostListRefresh = function(success) {
270 if (success) { 267 if (success) {
271 var host = remoting.hostList.getHostForId(connector.getHostId()); 268 var host = remoting.hostList.getHostForId(connector.getHostId());
272 if (host) { 269 if (host) {
273 connector.retryConnectMe2Me(host); 270 connector.retryConnectMe2Me(host);
274 return; 271 return;
275 } 272 }
276 } 273 }
277 that.handleError(error); 274 that.handleError(error);
278 }; 275 };
279 276
277 var mode = this.app_.getSessionConnector().getConnectionMode();
280 if (error.hasTag(remoting.Error.Tag.HOST_IS_OFFLINE) && 278 if (error.hasTag(remoting.Error.Tag.HOST_IS_OFFLINE) &&
281 that.refreshHostJidIfOffline_) { 279 mode === remoting.DesktopConnectedView.Mode.ME2ME &&
282 that.refreshHostJidIfOffline_ = false; 280 this.refreshHostJidIfOffline_) {
281 this.refreshHostJidIfOffline_ = false;
282
283 // The plugin will be re-created when the host finished refreshing 283 // The plugin will be re-created when the host finished refreshing
284 remoting.hostList.refresh(onHostListRefresh); 284 remoting.hostList.refresh(onHostListRefresh);
285 } else { 285 } else {
286 this.handleError(error); 286 this.handleError(error);
287 } 287 }
288 }; 288 };
289 289
290 /** 290 /**
291 * Called when the current session has reached the point where the host has 291 * Called when the current session has reached the point where the host has
292 * started streaming video frames to the client. 292 * started streaming video frames to the client.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 } else { 335 } else {
336 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); 336 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME);
337 } 337 }
338 }; 338 };
339 339
340 /** 340 /**
341 * No cleanup required for desktop remoting. 341 * No cleanup required for desktop remoting.
342 */ 342 */
343 remoting.DesktopRemoting.prototype.handleExit = function() { 343 remoting.DesktopRemoting.prototype.handleExit = function() {
344 }; 344 };
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