| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 remoting.toolbar = new remoting.Toolbar( | 46 remoting.toolbar = new remoting.Toolbar( |
| 47 document.getElementById('session-toolbar')); | 47 document.getElementById('session-toolbar')); |
| 48 remoting.clipboard = new remoting.Clipboard(); | 48 remoting.clipboard = new remoting.Clipboard(); |
| 49 | 49 |
| 50 refreshEmail_(); | 50 refreshEmail_(); |
| 51 var email = remoting.oauth2.getCachedEmail(); | 51 var email = remoting.oauth2.getCachedEmail(); |
| 52 if (email) { | 52 if (email) { |
| 53 document.getElementById('current-email').innerText = email; | 53 document.getElementById('current-email').innerText = email; |
| 54 } | 54 } |
| 55 | 55 |
| 56 remoting.showOrHideIt2MeUi(); |
| 57 remoting.showOrHideMe2MeUi(); |
| 58 |
| 56 // The plugin's onFocus handler sends a paste command to |window|, because | 59 // The plugin's onFocus handler sends a paste command to |window|, because |
| 57 // it can't send one to the plugin element itself. | 60 // it can't send one to the plugin element itself. |
| 58 window.addEventListener('paste', pluginGotPaste_, false); | 61 window.addEventListener('paste', pluginGotPaste_, false); |
| 59 | 62 |
| 60 if (isHostModeSupported_()) { | 63 if (isHostModeSupported_()) { |
| 61 var noShare = document.getElementById('chrome-os-no-share'); | 64 var noShare = document.getElementById('chrome-os-no-share'); |
| 62 noShare.parentNode.removeChild(noShare); | 65 noShare.parentNode.removeChild(noShare); |
| 63 } else { | 66 } else { |
| 64 var button = document.getElementById('share-button'); | 67 var button = document.getElementById('share-button'); |
| 65 button.disabled = true; | 68 button.disabled = true; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 */ | 218 */ |
| 216 function getUrlParameters_() { | 219 function getUrlParameters_() { |
| 217 var result = {}; | 220 var result = {}; |
| 218 var parts = window.location.search.substring(1).split('&'); | 221 var parts = window.location.search.substring(1).split('&'); |
| 219 for (var i = 0; i < parts.length; i++) { | 222 for (var i = 0; i < parts.length; i++) { |
| 220 var pair = parts[i].split('='); | 223 var pair = parts[i].split('='); |
| 221 result[pair[0]] = decodeURIComponent(pair[1]); | 224 result[pair[0]] = decodeURIComponent(pair[1]); |
| 222 } | 225 } |
| 223 return result; | 226 return result; |
| 224 } | 227 } |
| OLD | NEW |