Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(603)

Unified Diff: third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js

Issue 2864263002: [DevTools] Expose TCP targets config in frontend, use it for Node (Closed)
Patch Set: works Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
diff --git a/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js b/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
index 05a6c5e84bf956dd18ef9797f770064f2263a0e7..a296185b1baae71b0ed64e90ebbf5d1427513ac4 100644
--- a/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
+++ b/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
@@ -110,10 +110,18 @@
* @param {boolean} discoverUsbDevices
* @param {boolean} portForwardingEnabled
* @param {!Adb.PortForwardingConfig} portForwardingConfig
+ * @param {boolean} networkDiscoveryEnabled
+ * @param {!Adb.NetworkDiscoveryConfig} networkDiscoveryConfig
*/
- devicesDiscoveryConfigChanged(discoverUsbDevices, portForwardingEnabled, portForwardingConfig) {
- this._dispatchOnInspectorFrontendAPI(
- 'devicesDiscoveryConfigChanged', [discoverUsbDevices, portForwardingEnabled, portForwardingConfig]);
+ devicesDiscoveryConfigChanged(
+ discoverUsbDevices, portForwardingEnabled, portForwardingConfig, networkDiscoveryEnabled,
+ networkDiscoveryConfig) {
+ // Support for legacy front-ends (<M60).
+ networkDiscoveryEnabled = networkDiscoveryEnabled || false;
+ networkDiscoveryConfig = networkDiscoveryConfig || [];
+ this._dispatchOnInspectorFrontendAPI('devicesDiscoveryConfigChanged', [
+ discoverUsbDevices, portForwardingEnabled, portForwardingConfig, networkDiscoveryEnabled, networkDiscoveryConfig
+ ]);
}
/**
@@ -670,11 +678,22 @@
* @param {boolean} discoverUsbDevices
* @param {boolean} portForwardingEnabled
* @param {!Adb.PortForwardingConfig} portForwardingConfig
- */
- setDevicesDiscoveryConfig(discoverUsbDevices, portForwardingEnabled, portForwardingConfig) {
+ * @param {boolean} networkDiscoveryEnabled
+ * @param {!Adb.NetworkDiscoveryConfig} networkDiscoveryConfig
+ */
+ setDevicesDiscoveryConfig(
+ discoverUsbDevices, portForwardingEnabled, portForwardingConfig, networkDiscoveryEnabled,
+ networkDiscoveryConfig) {
+ // Support for legacy front-ends (<M60).
+ networkDiscoveryEnabled = networkDiscoveryEnabled || false;
+ networkDiscoveryConfig = networkDiscoveryConfig || [];
DevToolsAPI.sendMessageToEmbedder(
'setDevicesDiscoveryConfig',
- [discoverUsbDevices, portForwardingEnabled, JSON.stringify(portForwardingConfig)], null);
+ [
+ discoverUsbDevices, portForwardingEnabled, JSON.stringify(portForwardingConfig), networkDiscoveryEnabled,
+ JSON.stringify(networkDiscoveryConfig)
+ ],
+ null);
}
/**

Powered by Google App Engine
This is Rietveld 408576698