Skip to content

Commit

Permalink
Remove old code from before the new Dart Debug Extension (#2290)
Browse files Browse the repository at this point in the history
  • Loading branch information
elliette authored Nov 28, 2023
1 parent 6961b20 commit 3bb4a6a
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions dwds/lib/src/handlers/dev_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 3bb4a6a

Please sign in to comment.