| 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** @suppress {duplicate} */ | 7 /** @suppress {duplicate} */ |
| 8 var remoting = remoting || {}; | 8 var remoting = remoting || {}; |
| 9 | 9 |
| 10 /** @type {remoting.HostSession} */ remoting.hostSession = null; | 10 /** @type {remoting.HostSession} */ remoting.hostSession = null; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 UNEXPECTED: /*i18n-content*/'ERROR_UNEXPECTED', | 26 UNEXPECTED: /*i18n-content*/'ERROR_UNEXPECTED', |
| 27 SERVICE_UNAVAILABLE: /*i18n-content*/'ERROR_SERVICE_UNAVAILABLE' | 27 SERVICE_UNAVAILABLE: /*i18n-content*/'ERROR_SERVICE_UNAVAILABLE' |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * Entry point for app initialization. | 31 * Entry point for app initialization. |
| 32 */ | 32 */ |
| 33 remoting.init = function() { | 33 remoting.init = function() { |
| 34 remoting.logExtensionInfoAsync_(); | 34 remoting.logExtensionInfoAsync_(); |
| 35 l10n.localize(); | 35 l10n.localize(); |
| 36 var button = document.getElementById('toggle-scaling'); | |
| 37 button.title = chrome.i18n.getMessage(/*i18n-content*/'TOOLTIP_SCALING'); | |
| 38 // Create global objects. | 36 // Create global objects. |
| 39 remoting.oauth2 = new remoting.OAuth2(); | 37 remoting.oauth2 = new remoting.OAuth2(); |
| 40 remoting.stats = new remoting.ConnectionStats( | 38 remoting.stats = new remoting.ConnectionStats( |
| 41 document.getElementById('statistics')); | 39 document.getElementById('statistics')); |
| 42 remoting.formatIq = new remoting.FormatIq(); | 40 remoting.formatIq = new remoting.FormatIq(); |
| 43 remoting.hostList = new remoting.HostList( | 41 remoting.hostList = new remoting.HostList( |
| 44 document.getElementById('host-list'), | 42 document.getElementById('host-list'), |
| 45 document.getElementById('host-list-error')); | 43 document.getElementById('host-list-error')); |
| 46 remoting.toolbar = new remoting.Toolbar( | 44 remoting.toolbar = new remoting.Toolbar( |
| 47 document.getElementById('session-toolbar')); | 45 document.getElementById('session-toolbar')); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 */ | 213 */ |
| 216 function getUrlParameters_() { | 214 function getUrlParameters_() { |
| 217 var result = {}; | 215 var result = {}; |
| 218 var parts = window.location.search.substring(1).split('&'); | 216 var parts = window.location.search.substring(1).split('&'); |
| 219 for (var i = 0; i < parts.length; i++) { | 217 for (var i = 0; i < parts.length; i++) { |
| 220 var pair = parts[i].split('='); | 218 var pair = parts[i].split('='); |
| 221 result[pair[0]] = decodeURIComponent(pair[1]); | 219 result[pair[0]] = decodeURIComponent(pair[1]); |
| 222 } | 220 } |
| 223 return result; | 221 return result; |
| 224 } | 222 } |
| OLD | NEW |