From 0fcccc317bedcebb8d064e1d578eca379307c173 Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Wed, 27 Jan 2021 11:24:56 +0000 Subject: [PATCH] Remove Remote Devices panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This has been deprecated in https://crrev.com/c/1909383 in Chrome 80, which is 10 Chrome releases ago. To reduce the amount of technical debt, we are fully removing the panel now. Users can still use chrome://inspect which provides the same functionality as the Remote Devices panel once did. R=petermueller@chromium.org Bug: None Change-Id: I660cc98d840a0b350fa08cb7b0a0037a14e06c76 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2640573 Commit-Queue: Tim van der Lippe Reviewed-by: Paul Lewis Reviewed-by: Peter Müller Auto-Submit: Tim van der Lippe --- BUILD.gn | 1 - all_devtools_files.gni | 1 - all_devtools_modules.gni | 2 -- devtools_grd_files.gni | 4 --- devtools_module_entrypoints.gni | 1 - front_end/BUILD.gn | 1 - front_end/devices/BUILD.gn | 25 --------------- front_end/devices/DevicesView.ts | 46 ---------------------------- front_end/devices/ModuleUIStrings.ts | 24 --------------- front_end/devices/devices.ts | 5 --- front_end/devices/module.json | 13 -------- front_end/devtools_app.json | 1 - 12 files changed, 124 deletions(-) delete mode 100644 front_end/devices/BUILD.gn delete mode 100644 front_end/devices/DevicesView.ts delete mode 100644 front_end/devices/ModuleUIStrings.ts delete mode 100644 front_end/devices/devices.ts delete mode 100644 front_end/devices/module.json diff --git a/BUILD.gn b/BUILD.gn index 0efdf8f076..4d5140d3b2 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -127,7 +127,6 @@ generated_non_autostart_non_remote_modules = [ "$resources_out_dir/coverage/coverage_module.js", "$resources_out_dir/css_overview/css_overview_module.js", "$resources_out_dir/data_grid/data_grid_module.js", - "$resources_out_dir/devices/devices_module.js", "$resources_out_dir/diff/diff_module.js", "$resources_out_dir/elements/elements_module.js", "$resources_out_dir/event_listeners/event_listeners_module.js", diff --git a/all_devtools_files.gni b/all_devtools_files.gni index c85fc4954f..975d10499c 100644 --- a/all_devtools_files.gni +++ b/all_devtools_files.gni @@ -100,7 +100,6 @@ all_devtools_files = [ "front_end/data_grid/module.json", "front_end/device_mode_test_runner/device_mode_test_runner.js", "front_end/device_mode_test_runner/module.json", - "front_end/devices/module.json", "front_end/diff/module.json", "front_end/dom_extension/module.json", "front_end/elements_test_runner/elements_test_runner.js", diff --git a/all_devtools_modules.gni b/all_devtools_modules.gni index e305c3459c..78f6aa261e 100644 --- a/all_devtools_modules.gni +++ b/all_devtools_modules.gni @@ -128,8 +128,6 @@ all_typescript_module_sources = [ "developer_resources/DeveloperResourcesListView.js", "developer_resources/DeveloperResourcesView.js", "developer_resources/ModuleUIStrings.js", - "devices/DevicesView.js", - "devices/ModuleUIStrings.js", "diff/DiffWrapper.js", "diff/diff_match_patch.js", "dom_extension/DOMExtension.js", diff --git a/devtools_grd_files.gni b/devtools_grd_files.gni index a9adcb0763..6eee29a736 100644 --- a/devtools_grd_files.gni +++ b/devtools_grd_files.gni @@ -164,8 +164,6 @@ grd_files_release_sources = [ "front_end/developer_resources/developer_resources-meta.js", "front_end/developer_resources/developer_resources.js", "front_end/developer_resources/developer_resources_module.js", - "front_end/devices/devices.js", - "front_end/devices/devices_module.js", "front_end/devtools_app.html", "front_end/devtools_app.js", "front_end/devtools_compatibility.js", @@ -550,8 +548,6 @@ grd_files_debug_sources = [ "front_end/developer_resources/DeveloperResourcesListView.js", "front_end/developer_resources/DeveloperResourcesView.js", "front_end/developer_resources/ModuleUIStrings.js", - "front_end/devices/DevicesView.js", - "front_end/devices/ModuleUIStrings.js", "front_end/diff/DiffWrapper.js", "front_end/diff/diff_match_patch.js", "front_end/dom_extension/DOMExtension.js", diff --git a/devtools_module_entrypoints.gni b/devtools_module_entrypoints.gni index 9e09f303e4..73d0293b35 100644 --- a/devtools_module_entrypoints.gni +++ b/devtools_module_entrypoints.gni @@ -48,7 +48,6 @@ devtools_module_entrypoint_sources = [ "developer_resources/developer_resources-legacy.js", "developer_resources/developer_resources-meta.js", "developer_resources/developer_resources.js", - "devices/devices.js", "diff/diff-legacy.js", "diff/diff.js", "dom_extension/dom_extension.js", diff --git a/front_end/BUILD.gn b/front_end/BUILD.gn index b7ecb96e4c..21af3f9821 100644 --- a/front_end/BUILD.gn +++ b/front_end/BUILD.gn @@ -29,7 +29,6 @@ group("front_end") { "console_counters:bundle", "cookie_table:bundle", "data_grid:bundle", - "devices:bundle", "diff:bundle", "emulated_devices/optimized:optimized_emulated_devices", "event_listeners:bundle", diff --git a/front_end/devices/BUILD.gn b/front_end/devices/BUILD.gn deleted file mode 100644 index 49cb137a11..0000000000 --- a/front_end/devices/BUILD.gn +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("../../scripts/build/ninja/devtools_entrypoint.gni") -import("../../scripts/build/ninja/devtools_module.gni") - -devtools_module("devices") { - sources = [ - "DevicesView.ts", - "ModuleUIStrings.ts", - ] - - deps = [ - "../i18n:bundle", - "../sdk:bundle", - "../ui:bundle", - ] -} - -devtools_entrypoint("bundle") { - entrypoint = "devices.ts" - - deps = [ ":devices" ] -} diff --git a/front_end/devices/DevicesView.ts b/front_end/devices/DevicesView.ts deleted file mode 100644 index b2faf4e8f8..0000000000 --- a/front_end/devices/DevicesView.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import * as i18n from '../i18n/i18n.js'; -import * as SDK from '../sdk/sdk.js'; -import * as UI from '../ui/ui.js'; - -export const UIStrings = { - /** - *@description Deprecation notice for the Remote Devices tool - *@example {chrome://inspect/#devices} PH1 - */ - thisPanelHasBeenDeprecatedIn: - 'This panel has been deprecated in favor of the {PH1} interface, which has equivalent functionality.', -}; -const str_ = i18n.i18n.registerUIStrings('devices/DevicesView.js', UIStrings); - -// @ts-ignore -self.Devices = self.Devices || {}; - -// @ts-ignore -self.Devices.DevicesView = class extends UI.Widget.VBox { - constructor() { - super(true); - - const deprecationMessage = this.contentElement.createChild('span'); - const documentationLink = - UI.Fragment - .html`chrome://inspect/#devices`; - - self.onInvokeElement(documentationLink, event => { - const mainTarget = SDK.SDKModel.TargetManager.instance().mainTarget(); - if (mainTarget) { - mainTarget.pageAgent().invoke_navigate({url: 'chrome://inspect/#devices'}); - } - event.consume(true); - }); - - deprecationMessage.style.padding = '5px'; - deprecationMessage.appendChild( - i18n.i18n.getFormatLocalizedString(str_, UIStrings.thisPanelHasBeenDeprecatedIn, {PH1: documentationLink})); - - this.setDefaultFocusedElement(documentationLink); - } -}; diff --git a/front_end/devices/ModuleUIStrings.ts b/front_end/devices/ModuleUIStrings.ts deleted file mode 100644 index 10de2b656b..0000000000 --- a/front_end/devices/ModuleUIStrings.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import * as i18n from '../i18n/i18n.js'; -export const UIStrings = { - /** - *@description Title of the 'Remote devices' tool in the bottom drawer - */ - remoteDevices: 'Remote devices', - /** - *@description A tag of Remote Devices tool that can be searched in the command menu - */ - usb: 'usb', - /** - *@description A tag of Remote Devices tool that can be searched in the command menu - */ - android: 'android', - /** - *@description A tag of Remote Devices tool that can be searched in the command menu - */ - mobile: 'mobile', -}; -i18n.i18n.registerUIStrings('devices/ModuleUIStrings.js', UIStrings); diff --git a/front_end/devices/devices.ts b/front_end/devices/devices.ts deleted file mode 100644 index 8d62868e3a..0000000000 --- a/front_end/devices/devices.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import './DevicesView.js'; diff --git a/front_end/devices/module.json b/front_end/devices/module.json deleted file mode 100644 index 7e2cf793b4..0000000000 --- a/front_end/devices/module.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "dependencies": [ - "platform", - "ui", - "host", - "i18n", - "components" - ], - "modules": [ - "devices.js", - "DevicesView.js" - ] -} \ No newline at end of file diff --git a/front_end/devtools_app.json b/front_end/devtools_app.json index 8e73416c9e..c3905afb8d 100644 --- a/front_end/devtools_app.json +++ b/front_end/devtools_app.json @@ -10,7 +10,6 @@ { "name": "browser_debugger" }, { "name": "css_overview" }, { "name": "cookie_table" }, - { "name": "devices" }, { "name": "elements" }, { "name": "emulated_devices" }, { "name": "issues" },