| 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 var MIN_VERSION_TAB_CLOSE = 25; | 5 var MIN_VERSION_TAB_CLOSE = 25; |
| 6 var MIN_VERSION_TARGET_ID = 26; | 6 var MIN_VERSION_TARGET_ID = 26; |
| 7 var MIN_VERSION_NEW_TAB = 29; | 7 var MIN_VERSION_NEW_TAB = 29; |
| 8 var MIN_VERSION_TAB_ACTIVATE = 30; | 8 var MIN_VERSION_TAB_ACTIVATE = 30; |
| 9 var WEBRTC_SERIAL = 'WEBRTC'; | 9 var WEBRTC_SERIAL = 'WEBRTC'; |
| 10 | 10 |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 | 817 |
| 818 function updateTCPDiscoveryConfig(config) { | 818 function updateTCPDiscoveryConfig(config) { |
| 819 window.targetDiscoveryConfig = config; | 819 window.targetDiscoveryConfig = config; |
| 820 $('tcp-discovery-config-open').disabled = !config; | 820 $('tcp-discovery-config-open').disabled = !config; |
| 821 } | 821 } |
| 822 | 822 |
| 823 function appendRow(list, lineFactory, key, value) { | 823 function appendRow(list, lineFactory, key, value) { |
| 824 var line = lineFactory(key, value); | 824 var line = lineFactory(key, value); |
| 825 line.lastElementChild.addEventListener('keydown', function(e) { | 825 line.lastElementChild.addEventListener('keydown', function(e) { |
| 826 if (e.key == 'Tab' && | 826 if (e.key == 'Tab' && |
| 827 !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && | 827 !hasKeyModifiers(e) && |
| 828 line.classList.contains('fresh') && | 828 line.classList.contains('fresh') && |
| 829 !line.classList.contains('empty')) { | 829 !line.classList.contains('empty')) { |
| 830 // Tabbing forward on the fresh line, try create a new empty one. | 830 // Tabbing forward on the fresh line, try create a new empty one. |
| 831 if (commitFreshLineIfValid(true)) | 831 if (commitFreshLineIfValid(true)) |
| 832 e.preventDefault(); | 832 e.preventDefault(); |
| 833 } | 833 } |
| 834 }); | 834 }); |
| 835 | 835 |
| 836 var lineDelete = document.createElement('div'); | 836 var lineDelete = document.createElement('div'); |
| 837 lineDelete.className = 'close-button'; | 837 lineDelete.className = 'close-button'; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 Array.prototype.forEach.call( | 1019 Array.prototype.forEach.call( |
| 1020 deviceSection.querySelectorAll('.browser'), clearBrowserPorts); | 1020 deviceSection.querySelectorAll('.browser'), clearBrowserPorts); |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 Array.prototype.forEach.call( | 1023 Array.prototype.forEach.call( |
| 1024 document.querySelectorAll('.device'), clearPorts); | 1024 document.querySelectorAll('.device'), clearPorts); |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 document.addEventListener('DOMContentLoaded', onload); | 1027 document.addEventListener('DOMContentLoaded', onload); |
| 1028 window.addEventListener('hashchange', onHashChange); | 1028 window.addEventListener('hashchange', onHashChange); |
| OLD | NEW |