Skip to content

Commit

Permalink
[MV3 Debug Extension] Remove isMV3Extension field from DevtoolsRequest (
Browse files Browse the repository at this point in the history
  • Loading branch information
elliette committed Feb 15, 2023
1 parent c77043e commit 3ad544e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 93 deletions.
3 changes: 1 addition & 2 deletions dwds/debug_extension_mv3/web/debug_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,7 @@ Future<bool> _connectToDwds({
..instanceId = debugInfo.appInstanceId
..contextId = dartAppContextId
..tabUrl = tabUrl
..uriOnly = true
..isMv3Extension = true));
..uriOnly = true));
return true;
}

Expand Down
6 changes: 0 additions & 6 deletions dwds/lib/data/devtools_request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ abstract class DevToolsRequest
/// Only available on requests coming from the Dart Debug Extension. Is `null`
/// for local debug service.
bool? get uriOnly;

/// Whether or not the MV3 Dart Debug Extension sent the request. Is `null`
/// for local debug service.
///
/// Only available on requests coming from the Dart Debug Extension.
bool? get isMv3Extension;
}

/// A response to a [DevToolsRequest].
Expand Down
32 changes: 4 additions & 28 deletions dwds/lib/data/devtools_request.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions dwds/lib/src/handlers/dev_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -561,14 +561,10 @@ class DevHandler {
// handle how to open it. Therefore return early before opening a new
// tab or window:
if (devToolsRequest.uriOnly ?? false) {
// The MV3 extension is responsible for adding the IDE query
// parameter to the DevTools URI.
final devToolsUri = (devToolsRequest.isMv3Extension ?? false)
? _constructDevToolsUri(encodedUri)
: _constructDevToolsUri(
encodedUri,
ideQueryParam: 'ChromeDevTools',
);
final devToolsUri = _constructDevToolsUri(
encodedUri,
ideQueryParam: 'ChromeDevTools',
);
return extensionDebugger.sendEvent('dwds.devtoolsUri', devToolsUri);
}

Expand Down
83 changes: 34 additions & 49 deletions dwds/lib/src/injected/client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3ad544e

Please sign in to comment.