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 | 9 |
10 var queryParamsObject = {}; | 10 var queryParamsObject = {}; |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 dialog.deactivatedNodes.forEach(function(n) { n.tabIndex = -1; }); | 658 dialog.deactivatedNodes.forEach(function(n) { n.tabIndex = -1; }); |
659 window.modal = dialog; | 659 window.modal = dialog; |
660 } | 660 } |
661 | 661 |
662 function unsetModal(dialog) { | 662 function unsetModal(dialog) { |
663 for (var i = 0; i < dialog.deactivatedNodes.length; i++) { | 663 for (var i = 0; i < dialog.deactivatedNodes.length; i++) { |
664 var node = dialog.deactivatedNodes[i]; | 664 var node = dialog.deactivatedNodes[i]; |
665 if (dialog.tabIndexes[i] === null) | 665 if (dialog.tabIndexes[i] === null) |
666 node.removeAttribute('tabindex'); | 666 node.removeAttribute('tabindex'); |
667 else | 667 else |
668 node.setAttribute('tabindex', tabIndexes[i]); | 668 node.setAttribute('tabindex', dialog.tabIndexes[i]); |
669 } | 669 } |
670 | 670 |
671 if (window.holdDevices) { | 671 if (window.holdDevices) { |
672 populateRemoteTargets(window.holdDevices); | 672 populateRemoteTargets(window.holdDevices); |
673 delete window.holdDevices; | 673 delete window.holdDevices; |
674 } | 674 } |
675 | 675 |
676 delete dialog.deactivatedNodes; | 676 delete dialog.deactivatedNodes; |
677 delete dialog.tabIndexes; | 677 delete dialog.tabIndexes; |
678 delete window.modal; | 678 delete window.modal; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 deviceSection.querySelector('.device-ports').textContent = ''; | 939 deviceSection.querySelector('.device-ports').textContent = ''; |
940 } | 940 } |
941 | 941 |
942 Array.prototype.forEach.call( | 942 Array.prototype.forEach.call( |
943 document.querySelectorAll('.device'), clearPorts); | 943 document.querySelectorAll('.device'), clearPorts); |
944 } | 944 } |
945 | 945 |
946 document.addEventListener('DOMContentLoaded', onload); | 946 document.addEventListener('DOMContentLoaded', onload); |
947 | 947 |
948 window.addEventListener('hashchange', onHashChange); | 948 window.addEventListener('hashchange', onHashChange); |
OLD | NEW |