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

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

Issue 2414453004: Don't show an error message if there isn't one. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 (function() { 8 (function() {
9 9
10 'use strict'; 10 'use strict';
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 remoting.It2MeActivity.prototype.stop = function() { 99 remoting.It2MeActivity.prototype.stop = function() {
100 if (this.desktopActivity_) { 100 if (this.desktopActivity_) {
101 this.desktopActivity_.stop(); 101 this.desktopActivity_.stop();
102 } 102 }
103 }; 103 };
104 104
105 /** 105 /**
106 * @param {!remoting.Error} error 106 * @param {!remoting.Error} error
107 */ 107 */
108 remoting.It2MeActivity.prototype.onConnectionFailed = function(error) { 108 remoting.It2MeActivity.prototype.onConnectionFailed = function(error) {
109 this.showErrorMessage_(error); 109 // onConnectionFailed is also called if the connection is canceled, in which
110 // case no error message should be shown.
111 if (!error.isNone()) {
112 this.showErrorMessage_(error);
113 }
110 base.dispose(this.desktopActivity_); 114 base.dispose(this.desktopActivity_);
111 this.desktopActivity_ = null; 115 this.desktopActivity_ = null;
112 }; 116 };
113 117
114 /** 118 /**
115 * @param {!remoting.ConnectionInfo} connectionInfo 119 * @param {!remoting.ConnectionInfo} connectionInfo
116 */ 120 */
117 remoting.It2MeActivity.prototype.onConnected = function(connectionInfo) { 121 remoting.It2MeActivity.prototype.onConnected = function(connectionInfo) {
118 this.accessCodeDialog_.inputField().value = ''; 122 this.accessCodeDialog_.inputField().value = '';
119 }; 123 };
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 /** 182 /**
179 * @param {remoting.Host} host 183 * @param {remoting.Host} host
180 * @private 184 * @private
181 */ 185 */
182 remoting.It2MeActivity.prototype.connect_ = function(host) { 186 remoting.It2MeActivity.prototype.connect_ = function(host) {
183 this.desktopActivity_.start( 187 this.desktopActivity_.start(
184 host, new remoting.CredentialsProvider({accessCode: this.passCode_})); 188 host, new remoting.CredentialsProvider({accessCode: this.passCode_}));
185 }; 189 };
186 190
187 })(); 191 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698