OLD | NEW |
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 'client screen' for Chromoting. | 7 * Functions related to the 'client screen' for Chromoting. |
8 */ | 8 */ |
9 | 9 |
10 'use strict'; | 10 'use strict'; |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 remoting.HostSettings.load(host.hostId, connectMe2MeHostSettingsRetrieved); | 314 remoting.HostSettings.load(host.hostId, connectMe2MeHostSettingsRetrieved); |
315 }; | 315 }; |
316 | 316 |
317 /** @param {remoting.ClientSession} clientSession */ | 317 /** @param {remoting.ClientSession} clientSession */ |
318 remoting.onConnected = function(clientSession) { | 318 remoting.onConnected = function(clientSession) { |
319 remoting.clientSession = clientSession; | 319 remoting.clientSession = clientSession; |
320 remoting.clientSession.addEventListener('stateChanged', onClientStateChange_); | 320 remoting.clientSession.addEventListener('stateChanged', onClientStateChange_); |
321 setConnectionInterruptedButtonsText_(); | 321 setConnectionInterruptedButtonsText_(); |
322 document.getElementById('access-code-entry').value = ''; | 322 document.getElementById('access-code-entry').value = ''; |
323 remoting.setMode(remoting.AppMode.IN_SESSION); | 323 remoting.setMode(remoting.AppMode.IN_SESSION); |
324 remoting.toolbar.center(); | 324 if (!base.isAppsV2()) { |
325 remoting.toolbar.preview(); | 325 remoting.toolbar.center(); |
| 326 remoting.toolbar.preview(); |
| 327 } |
326 remoting.clipboard.startSession(); | 328 remoting.clipboard.startSession(); |
327 updateStatistics_(); | 329 updateStatistics_(); |
328 remoting.hangoutSessionEvents.raiseEvent( | 330 remoting.hangoutSessionEvents.raiseEvent( |
329 remoting.hangoutSessionEvents.sessionStateChanged, | 331 remoting.hangoutSessionEvents.sessionStateChanged, |
330 remoting.ClientSession.State.CONNECTED | 332 remoting.ClientSession.State.CONNECTED |
331 ); | 333 ); |
332 if (remoting.pairingRequested) { | 334 if (remoting.pairingRequested) { |
333 /** | 335 /** |
334 * @param {string} clientId | 336 * @param {string} clientId |
335 * @param {string} sharedSecret | 337 * @param {string} sharedSecret |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 * Create a session connector if one doesn't already exist. | 384 * Create a session connector if one doesn't already exist. |
383 */ | 385 */ |
384 remoting.ensureSessionConnector_ = function() { | 386 remoting.ensureSessionConnector_ = function() { |
385 if (!remoting.connector) { | 387 if (!remoting.connector) { |
386 remoting.connector = remoting.SessionConnector.factory.createConnector( | 388 remoting.connector = remoting.SessionConnector.factory.createConnector( |
387 document.getElementById('video-container'), | 389 document.getElementById('video-container'), |
388 remoting.onConnected, | 390 remoting.onConnected, |
389 showConnectError_, remoting.onExtensionMessage); | 391 showConnectError_, remoting.onExtensionMessage); |
390 } | 392 } |
391 }; | 393 }; |
OLD | NEW |