| 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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 checkboxSendsCommand('discover-tcp-devices-enable', | 632 checkboxSendsCommand('discover-tcp-devices-enable', |
| 633 'set-discover-tcp-targets-enabled'); | 633 'set-discover-tcp-targets-enabled'); |
| 634 | 634 |
| 635 $('port-forwarding-config-open').addEventListener( | 635 $('port-forwarding-config-open').addEventListener( |
| 636 'click', openPortForwardingConfig); | 636 'click', openPortForwardingConfig); |
| 637 $('tcp-discovery-config-open').addEventListener( | 637 $('tcp-discovery-config-open').addEventListener( |
| 638 'click', openTargetsConfig); | 638 'click', openTargetsConfig); |
| 639 $('config-dialog-close').addEventListener('click', function() { | 639 $('config-dialog-close').addEventListener('click', function() { |
| 640 $('config-dialog').commit(true); | 640 $('config-dialog').commit(true); |
| 641 }); | 641 }); |
| 642 $('node-frontend').addEventListener( |
| 643 'click', sendCommand.bind(null, 'open-node-frontend')); |
| 642 } | 644 } |
| 643 | 645 |
| 644 function checkboxHandler(command, event) { | 646 function checkboxHandler(command, event) { |
| 645 sendCommand(command, event.target.checked); | 647 sendCommand(command, event.target.checked); |
| 646 } | 648 } |
| 647 | 649 |
| 648 function checkboxSendsCommand(id, command) { | 650 function checkboxSendsCommand(id, command) { |
| 649 $(id).addEventListener('change', checkboxHandler.bind(null, command)); | 651 $(id).addEventListener('change', checkboxHandler.bind(null, command)); |
| 650 } | 652 } |
| 651 | 653 |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 Array.prototype.forEach.call( | 1021 Array.prototype.forEach.call( |
| 1020 deviceSection.querySelectorAll('.browser'), clearBrowserPorts); | 1022 deviceSection.querySelectorAll('.browser'), clearBrowserPorts); |
| 1021 } | 1023 } |
| 1022 | 1024 |
| 1023 Array.prototype.forEach.call( | 1025 Array.prototype.forEach.call( |
| 1024 document.querySelectorAll('.device'), clearPorts); | 1026 document.querySelectorAll('.device'), clearPorts); |
| 1025 } | 1027 } |
| 1026 | 1028 |
| 1027 document.addEventListener('DOMContentLoaded', onload); | 1029 document.addEventListener('DOMContentLoaded', onload); |
| 1028 window.addEventListener('hashchange', onHashChange); | 1030 window.addEventListener('hashchange', onHashChange); |
| OLD | NEW |