| 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 e.preventDefault(); | 741 e.preventDefault(); |
| 742 } | 742 } |
| 743 }); | 743 }); |
| 744 | 744 |
| 745 var lineDelete = document.createElement('div'); | 745 var lineDelete = document.createElement('div'); |
| 746 lineDelete.className = 'close-button'; | 746 lineDelete.className = 'close-button'; |
| 747 lineDelete.addEventListener('click', function() { | 747 lineDelete.addEventListener('click', function() { |
| 748 var newSelection = line.nextElementSibling; | 748 var newSelection = line.nextElementSibling; |
| 749 line.parentNode.removeChild(line); | 749 line.parentNode.removeChild(line); |
| 750 selectLine(newSelection); | 750 selectLine(newSelection); |
| 751 commitPortForwardingConfig(false); |
| 751 }); | 752 }); |
| 752 line.appendChild(lineDelete); | 753 line.appendChild(lineDelete); |
| 753 | 754 |
| 754 line.addEventListener('click', selectLine.bind(null, line)); | 755 line.addEventListener('click', selectLine.bind(null, line)); |
| 755 line.addEventListener('focus', selectLine.bind(null, line)); | 756 line.addEventListener('focus', selectLine.bind(null, line)); |
| 756 | 757 |
| 757 checkEmptyLine(line); | 758 checkEmptyLine(line); |
| 758 | 759 |
| 759 return line; | 760 return line; |
| 760 } | 761 } |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 deviceSection.querySelectorAll('.browser'), clearBrowserPorts); | 930 deviceSection.querySelectorAll('.browser'), clearBrowserPorts); |
| 930 } | 931 } |
| 931 | 932 |
| 932 Array.prototype.forEach.call( | 933 Array.prototype.forEach.call( |
| 933 document.querySelectorAll('.device'), clearPorts); | 934 document.querySelectorAll('.device'), clearPorts); |
| 934 } | 935 } |
| 935 | 936 |
| 936 document.addEventListener('DOMContentLoaded', onload); | 937 document.addEventListener('DOMContentLoaded', onload); |
| 937 | 938 |
| 938 window.addEventListener('hashchange', onHashChange); | 939 window.addEventListener('hashchange', onHashChange); |
| OLD | NEW |