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 window.addEventListener('blur', pluginLostFocus_, false); | 10 window.addEventListener('blur', pluginLostFocus_, false); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 var div = document.getElementById('host-plugin-container'); | 222 var div = document.getElementById('host-plugin-container'); |
223 var plugin = document.createElement('embed'); | 223 var plugin = document.createElement('embed'); |
224 plugin.type = remoting.PLUGIN_MIMETYPE; | 224 plugin.type = remoting.PLUGIN_MIMETYPE; |
225 plugin.id = remoting.HOST_PLUGIN_ID; | 225 plugin.id = remoting.HOST_PLUGIN_ID; |
226 // Hiding the plugin means it doesn't load, so make it size zero instead. | 226 // Hiding the plugin means it doesn't load, so make it size zero instead. |
227 plugin.width = 0; | 227 plugin.width = 0; |
228 plugin.height = 0; | 228 plugin.height = 0; |
229 div.appendChild(plugin); | 229 div.appendChild(plugin); |
230 plugin.onStateChanged = onStateChanged_; | 230 plugin.onStateChanged = onStateChanged_; |
231 plugin.logDebugInfo = debugInfoCallback_; | 231 plugin.logDebugInfo = debugInfoCallback_; |
| 232 plugin.localizeString = chrome.i18n.getMessage; |
232 plugin.connect(getEmail(), | 233 plugin.connect(getEmail(), |
233 'oauth2:' + remoting.oauth2.getAccessToken()); | 234 'oauth2:' + remoting.oauth2.getAccessToken()); |
234 } | 235 } |
235 | 236 |
236 function disableTimeoutCountdown_() { | 237 function disableTimeoutCountdown_() { |
237 if (remoting.timerRunning) { | 238 if (remoting.timerRunning) { |
238 clearInterval(remoting.accessCodeTimerId); | 239 clearInterval(remoting.accessCodeTimerId); |
239 remoting.timerRunning = false; | 240 remoting.timerRunning = false; |
240 updateTimeoutStyles_(); | 241 updateTimeoutStyles_(); |
241 } | 242 } |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 if ((remoting.getMajorMode() == remoting.AppMode.HOST && | 610 if ((remoting.getMajorMode() == remoting.AppMode.HOST && |
610 remoting.currentMode != remoting.AppMode.HOST_UNSHARED) || | 611 remoting.currentMode != remoting.AppMode.HOST_UNSHARED) || |
611 remoting.getMajorMode() == remoting.AppMode.IN_SESSION || | 612 remoting.getMajorMode() == remoting.AppMode.IN_SESSION || |
612 remoting.currentMode == remoting.AppMode.CLIENT_CONNECTING) { | 613 remoting.currentMode == remoting.AppMode.CLIENT_CONNECTING) { |
613 var result = chrome.i18n.getMessage('closePrompt'); | 614 var result = chrome.i18n.getMessage('closePrompt'); |
614 return result; | 615 return result; |
615 } | 616 } |
616 } | 617 } |
617 | 618 |
618 }()); | 619 }()); |
OLD | NEW |