From 3bb4a6a6385203ef9aac439d024d20df61055721 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Tue, 28 Nov 2023 15:35:38 -0800 Subject: [PATCH] Remove old code from before the new Dart Debug Extension (#2290) --- dwds/lib/src/handlers/dev_handler.dart | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/dwds/lib/src/handlers/dev_handler.dart b/dwds/lib/src/handlers/dev_handler.dart index 23e7ca06b..9de7a175f 100644 --- a/dwds/lib/src/handlers/dev_handler.dart +++ b/dwds/lib/src/handlers/dev_handler.dart @@ -625,27 +625,13 @@ class DevHandler { devToolsStart: DateTime.now(), ); - // TODO(elliette): Remove handling requests from the MV2 extension after - // MV3 release. - // If we only want the URI, this means the Dart Debug Extension should - // handle how to open it. Therefore return early before opening a new - // tab or window: - if (devToolsRequest.uriOnly ?? false) { - final devToolsUri = _constructDevToolsUri( - encodedUri, - ideQueryParam: 'ChromeDevTools', - ); - return extensionDebugger.sendEvent('dwds.devtoolsUri', devToolsUri); - } - - // Otherwise, launch DevTools in a new tab / window: - await _launchDevTools( - extensionDebugger, - _constructDevToolsUri( - encodedUri, - ideQueryParam: 'DebugExtension', - ), + emitEvent(DwdsEvent.devtoolsLaunch()); + // Send the DevTools URI to the Dart Debug Extension so that it can open it: + final devToolsUri = _constructDevToolsUri( + encodedUri, + ideQueryParam: 'ChromeDevTools', ); + return extensionDebugger.sendEvent('dwds.devtoolsUri', devToolsUri); } DevTools _ensureDevTools() {