| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 showWaiting_(); | 263 showWaiting_(); |
| 264 | 264 |
| 265 var div = document.getElementById('host-plugin-container'); | 265 var div = document.getElementById('host-plugin-container'); |
| 266 var plugin = document.createElement('embed'); | 266 var plugin = document.createElement('embed'); |
| 267 plugin.setAttribute('type', remoting.PLUGIN_MIMETYPE); | 267 plugin.setAttribute('type', remoting.PLUGIN_MIMETYPE); |
| 268 plugin.setAttribute('hidden', 'true'); | 268 plugin.setAttribute('hidden', 'true'); |
| 269 plugin.setAttribute('id', remoting.HOST_PLUGIN_ID); | 269 plugin.setAttribute('id', remoting.HOST_PLUGIN_ID); |
| 270 div.appendChild(plugin); | 270 div.appendChild(plugin); |
| 271 plugin.onStateChanged = onStateChanged_; | 271 plugin.onStateChanged = onStateChanged_; |
| 272 plugin.logDebugInfoCallback = debugInfoCallback_; | 272 plugin.logDebugInfo = debugInfoCallback_; |
| 273 plugin.connect(getEmail(), | 273 plugin.connect(getEmail(), |
| 274 'oauth2:' + remoting.oauth2.getAccessToken()); | 274 'oauth2:' + remoting.oauth2.getAccessToken()); |
| 275 } | 275 } |
| 276 remoting.tryShare = tryShare; | 276 remoting.tryShare = tryShare; |
| 277 | 277 |
| 278 function onStateChanged_() { | 278 function onStateChanged_() { |
| 279 var plugin = document.getElementById(remoting.HOST_PLUGIN_ID); | 279 var plugin = document.getElementById(remoting.HOST_PLUGIN_ID); |
| 280 var state = plugin.state; | 280 var state = plugin.state; |
| 281 if (state == plugin.REQUESTED_ACCESS_CODE) { | 281 if (state == plugin.REQUESTED_ACCESS_CODE) { |
| 282 setHostMode('preparing-to-share'); | 282 setHostMode('preparing-to-share'); |
| (...skipping 228 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 |