Skip to content

[MV3 Debug Extension] Remove isMv3Extension field from DevToolsRequest #1963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.