| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /* eslint-disable indent */ | 4 /* eslint-disable indent */ |
| 5 (function(window) { | 5 (function(window) { |
| 6 | 6 |
| 7 // DevToolsAPI ---------------------------------------------------------------
- | 7 // DevToolsAPI ---------------------------------------------------------------
- |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * @unrestricted | 10 * @unrestricted |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 * @param {number} count | 103 * @param {number} count |
| 104 */ | 104 */ |
| 105 deviceCountUpdated(count) { | 105 deviceCountUpdated(count) { |
| 106 this._dispatchOnInspectorFrontendAPI('deviceCountUpdated', [count]); | 106 this._dispatchOnInspectorFrontendAPI('deviceCountUpdated', [count]); |
| 107 } | 107 } |
| 108 | 108 |
| 109 /** | 109 /** |
| 110 * @param {boolean} discoverUsbDevices | 110 * @param {boolean} discoverUsbDevices |
| 111 * @param {boolean} portForwardingEnabled | 111 * @param {boolean} portForwardingEnabled |
| 112 * @param {!Adb.PortForwardingConfig} portForwardingConfig | 112 * @param {!Adb.PortForwardingConfig} portForwardingConfig |
| 113 * @param {boolean} networkDiscoveryEnabled |
| 114 * @param {!Adb.NetworkDiscoveryConfig} networkDiscoveryConfig |
| 113 */ | 115 */ |
| 114 devicesDiscoveryConfigChanged(discoverUsbDevices, portForwardingEnabled, por
tForwardingConfig) { | 116 devicesDiscoveryConfigChanged( |
| 115 this._dispatchOnInspectorFrontendAPI( | 117 discoverUsbDevices, portForwardingEnabled, portForwardingConfig, network
DiscoveryEnabled, |
| 116 'devicesDiscoveryConfigChanged', [discoverUsbDevices, portForwardingEn
abled, portForwardingConfig]); | 118 networkDiscoveryConfig) { |
| 119 // Support for legacy front-ends (<M60). |
| 120 networkDiscoveryEnabled = networkDiscoveryEnabled || false; |
| 121 networkDiscoveryConfig = networkDiscoveryConfig || []; |
| 122 this._dispatchOnInspectorFrontendAPI('devicesDiscoveryConfigChanged', [ |
| 123 discoverUsbDevices, portForwardingEnabled, portForwardingConfig, network
DiscoveryEnabled, networkDiscoveryConfig |
| 124 ]); |
| 117 } | 125 } |
| 118 | 126 |
| 119 /** | 127 /** |
| 120 * @param {!Adb.PortForwardingStatus} status | 128 * @param {!Adb.PortForwardingStatus} status |
| 121 */ | 129 */ |
| 122 devicesPortForwardingStatusChanged(status) { | 130 devicesPortForwardingStatusChanged(status) { |
| 123 this._dispatchOnInspectorFrontendAPI('devicesPortForwardingStatusChanged',
[status]); | 131 this._dispatchOnInspectorFrontendAPI('devicesPortForwardingStatusChanged',
[status]); |
| 124 } | 132 } |
| 125 | 133 |
| 126 /** | 134 /** |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 */ | 671 */ |
| 664 readyForTest() { | 672 readyForTest() { |
| 665 DevToolsAPI.sendMessageToEmbedder('readyForTest', [], null); | 673 DevToolsAPI.sendMessageToEmbedder('readyForTest', [], null); |
| 666 } | 674 } |
| 667 | 675 |
| 668 /** | 676 /** |
| 669 * @override | 677 * @override |
| 670 * @param {boolean} discoverUsbDevices | 678 * @param {boolean} discoverUsbDevices |
| 671 * @param {boolean} portForwardingEnabled | 679 * @param {boolean} portForwardingEnabled |
| 672 * @param {!Adb.PortForwardingConfig} portForwardingConfig | 680 * @param {!Adb.PortForwardingConfig} portForwardingConfig |
| 681 * @param {boolean} networkDiscoveryEnabled |
| 682 * @param {!Adb.NetworkDiscoveryConfig} networkDiscoveryConfig |
| 673 */ | 683 */ |
| 674 setDevicesDiscoveryConfig(discoverUsbDevices, portForwardingEnabled, portFor
wardingConfig) { | 684 setDevicesDiscoveryConfig( |
| 685 discoverUsbDevices, portForwardingEnabled, portForwardingConfig, network
DiscoveryEnabled, |
| 686 networkDiscoveryConfig) { |
| 687 // Support for legacy front-ends (<M60). |
| 688 networkDiscoveryEnabled = networkDiscoveryEnabled || false; |
| 689 networkDiscoveryConfig = networkDiscoveryConfig || []; |
| 675 DevToolsAPI.sendMessageToEmbedder( | 690 DevToolsAPI.sendMessageToEmbedder( |
| 676 'setDevicesDiscoveryConfig', | 691 'setDevicesDiscoveryConfig', |
| 677 [discoverUsbDevices, portForwardingEnabled, JSON.stringify(portForward
ingConfig)], null); | 692 [ |
| 693 discoverUsbDevices, portForwardingEnabled, JSON.stringify(portForwar
dingConfig), networkDiscoveryEnabled, |
| 694 JSON.stringify(networkDiscoveryConfig) |
| 695 ], |
| 696 null); |
| 678 } | 697 } |
| 679 | 698 |
| 680 /** | 699 /** |
| 681 * @override | 700 * @override |
| 682 * @param {boolean} enabled | 701 * @param {boolean} enabled |
| 683 */ | 702 */ |
| 684 setDevicesUpdatesEnabled(enabled) { | 703 setDevicesUpdatesEnabled(enabled) { |
| 685 DevToolsAPI.sendMessageToEmbedder('setDevicesUpdatesEnabled', [enabled], n
ull); | 704 DevToolsAPI.sendMessageToEmbedder('setDevicesUpdatesEnabled', [enabled], n
ull); |
| 686 } | 705 } |
| 687 | 706 |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1273 * @return {boolean} | 1292 * @return {boolean} |
| 1274 */ | 1293 */ |
| 1275 DOMTokenList.prototype.toggle = function(token, force) { | 1294 DOMTokenList.prototype.toggle = function(token, force) { |
| 1276 if (arguments.length === 1) | 1295 if (arguments.length === 1) |
| 1277 force = !this.contains(token); | 1296 force = !this.contains(token); |
| 1278 return this.__originalDOMTokenListToggle(token, !!force); | 1297 return this.__originalDOMTokenListToggle(token, !!force); |
| 1279 }; | 1298 }; |
| 1280 } | 1299 } |
| 1281 | 1300 |
| 1282 })(window); | 1301 })(window); |
| OLD | NEW |