OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 var remoting = remoting || {}; | 5 var remoting = remoting || {}; |
6 | 6 |
7 (function() { | 7 (function() { |
8 "use strict"; | 8 "use strict"; |
9 | 9 |
10 /** @enum {string} */ | 10 /** @enum {string} */ |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 | 233 |
234 function setClientMode(mode) { | 234 function setClientMode(mode) { |
235 var section = document.getElementById('client-panel'); | 235 var section = document.getElementById('client-panel'); |
236 var modes = section.getElementsByClassName('mode'); | 236 var modes = section.getElementsByClassName('mode'); |
237 remoting.debug.log('Client mode: ' + mode); | 237 remoting.debug.log('Client mode: ' + mode); |
238 setMode_(mode, modes); | 238 setMode_(mode, modes); |
239 } | 239 } |
240 | 240 |
241 function showWaiting_() { | 241 function showWaiting_() { |
242 showElement(document.getElementById('client-footer'), false); | 242 showElement(document.getElementById('client-footer-text'), false); |
243 showElement(document.getElementById('host-footer'), false); | 243 showElement(document.getElementById('host-footer-text'), false); |
244 showElement(document.getElementById('waiting-footer'), true); | 244 showElement(document.getElementById('waiting-footer'), true); |
245 document.getElementById('cancel-button').disabled = false; | 245 document.getElementById('cancel-button').disabled = false; |
246 } | 246 } |
247 | 247 |
248 function tryShare() { | 248 function tryShare() { |
249 remoting.debug.log('Attempting to share...'); | 249 remoting.debug.log('Attempting to share...'); |
250 if (remoting.oauth2.needsNewAccessToken()) { | 250 if (remoting.oauth2.needsNewAccessToken()) { |
251 remoting.debug.log('Refreshing token...'); | 251 remoting.debug.log('Refreshing token...'); |
252 remoting.oauth2.refreshAccessToken(function() { | 252 remoting.oauth2.refreshAccessToken(function() { |
253 if (remoting.oauth2.needsNewAccessToken()) { | 253 if (remoting.oauth2.needsNewAccessToken()) { |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 } | 511 } |
512 | 512 |
513 remoting.toggleScaleToFit = function() { | 513 remoting.toggleScaleToFit = function() { |
514 remoting.scaleToFit = !remoting.scaleToFit; | 514 remoting.scaleToFit = !remoting.scaleToFit; |
515 document.getElementById('scale-to-fit-toggle').value = | 515 document.getElementById('scale-to-fit-toggle').value = |
516 remoting.scaleToFit ? 'No scaling' : 'Scale to fit'; | 516 remoting.scaleToFit ? 'No scaling' : 'Scale to fit'; |
517 remoting.session.toggleScaleToFit(remoting.scaleToFit); | 517 remoting.session.toggleScaleToFit(remoting.scaleToFit); |
518 } | 518 } |
519 | 519 |
520 }()); | 520 }()); |
OLD | NEW |