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

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

Issue 2453193004: CRD Webapp changes to support Confirmation Dialog It2Me state (Closed)
Patch Set: Merging with upstream CL and updating the connection string enum to match Created 4 years, 1 month 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 | « remoting/webapp/crd/html/dialog_host.html ('k') | remoting/webapp/crd/js/host_session.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * Functions related to the 'host screen' for Chromoting. 7 * Functions related to the 'host screen' for Chromoting.
8 */ 8 */
9 9
10 /** @suppress {duplicate} */ 10 /** @suppress {duplicate} */
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 updateAccessCodeTimeoutElement_(); 163 updateAccessCodeTimeoutElement_();
164 updateTimeoutStyles_(); 164 updateTimeoutStyles_();
165 remoting.setMode(remoting.AppMode.HOST_WAITING_FOR_CONNECTION); 165 remoting.setMode(remoting.AppMode.HOST_WAITING_FOR_CONNECTION);
166 } else { 166 } else {
167 // This can only happen if the cloud tells us that the code lifetime is 167 // This can only happen if the cloud tells us that the code lifetime is
168 // <= 0s, which shouldn't happen so we don't care how clean this UX is. 168 // <= 0s, which shouldn't happen so we don't care how clean this UX is.
169 console.error('Access code already invalid on receipt!'); 169 console.error('Access code already invalid on receipt!');
170 remoting.cancelShare(); 170 remoting.cancelShare();
171 } 171 }
172 172
173 } else if (state == remoting.HostSession.State.CONNECTING) {
174 console.log('Host state: CONNECTING');
175 remoting.setMode(remoting.AppMode.HOST_WAITING_FOR_ACCEPT);
176 disableTimeoutCountdown_();
177
173 } else if (state == remoting.HostSession.State.CONNECTED) { 178 } else if (state == remoting.HostSession.State.CONNECTED) {
174 console.log('Host state: CONNECTED'); 179 console.log('Host state: CONNECTED');
175 var element = document.getElementById('host-shared-message'); 180 var element = document.getElementById('host-shared-message');
176 var client = hostSession_.getClient(); 181 var client = hostSession_.getClient();
177 l10n.localizeElement(element, client); 182 l10n.localizeElement(element, client);
178 remoting.setMode(remoting.AppMode.HOST_SHARED); 183 remoting.setMode(remoting.AppMode.HOST_SHARED);
179 disableTimeoutCountdown_(); 184 disableTimeoutCountdown_();
180 185
181 } else if (state == remoting.HostSession.State.DISCONNECTING) { 186 } else if (state == remoting.HostSession.State.DISCONNECTING) {
182 console.log('Host state: DISCONNECTING'); 187 console.log('Host state: DISCONNECTING');
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 function createLogger_() { 390 function createLogger_() {
386 // Create a new logger for each session to refresh the session id. 391 // Create a new logger for each session to refresh the session id.
387 var logger = new remoting.SessionLogger( 392 var logger = new remoting.SessionLogger(
388 remoting.ChromotingEvent.Role.HOST, 393 remoting.ChromotingEvent.Role.HOST,
389 remoting.TelemetryEventWriter.Client.write); 394 remoting.TelemetryEventWriter.Client.write);
390 logger.setLogEntryMode(remoting.ChromotingEvent.Mode.IT2ME); 395 logger.setLogEntryMode(remoting.ChromotingEvent.Mode.IT2ME);
391 return logger; 396 return logger;
392 } 397 }
393 398
394 })(); 399 })();
OLDNEW
« no previous file with comments | « remoting/webapp/crd/html/dialog_host.html ('k') | remoting/webapp/crd/js/host_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698