Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
563338a1
Unverified
Commit
563338a1
authored
Mar 24, 2021
by
Danny Tuppeny
Committed by
GitHub
Mar 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support WebSockets for injected client (#78961)
parent
aa1df71c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
0 deletions
+28
-0
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+2
-0
device.dart
packages/flutter_tools/lib/src/device.dart
+3
-0
devfs_web.dart
packages/flutter_tools/lib/src/isolated/devfs_web.dart
+6
-0
resident_web_runner.dart
...s/flutter_tools/lib/src/isolated/resident_web_runner.dart
+1
-0
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+9
-0
devfs_web_test.dart
.../flutter_tools/test/general.shard/web/devfs_web_test.dart
+7
-0
No files found.
packages/flutter_tools/lib/src/commands/run.dart
View file @
563338a1
...
...
@@ -177,6 +177,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
port:
featureFlags
.
isWebEnabled
?
stringArg
(
'web-port'
)
:
''
,
webUseSseForDebugProxy:
featureFlags
.
isWebEnabled
&&
stringArg
(
'web-server-debug-protocol'
)
==
'sse'
,
webUseSseForDebugBackend:
featureFlags
.
isWebEnabled
&&
stringArg
(
'web-server-debug-backend-protocol'
)
==
'sse'
,
webUseSseForInjectedClient:
featureFlags
.
isWebEnabled
&&
stringArg
(
'web-server-debug-injected-client-protocol'
)
==
'sse'
,
webEnableExposeUrl:
featureFlags
.
isWebEnabled
&&
boolArg
(
'web-allow-expose-url'
),
webRunHeadless:
featureFlags
.
isWebEnabled
&&
boolArg
(
'web-run-headless'
),
webBrowserDebugPort:
browserDebugPort
,
...
...
@@ -209,6 +210,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
port:
featureFlags
.
isWebEnabled
?
stringArg
(
'web-port'
)
:
''
,
webUseSseForDebugProxy:
featureFlags
.
isWebEnabled
&&
stringArg
(
'web-server-debug-protocol'
)
==
'sse'
,
webUseSseForDebugBackend:
featureFlags
.
isWebEnabled
&&
stringArg
(
'web-server-debug-backend-protocol'
)
==
'sse'
,
webUseSseForInjectedClient:
featureFlags
.
isWebEnabled
&&
stringArg
(
'web-server-debug-injected-client-protocol'
)
==
'sse'
,
webEnableExposeUrl:
featureFlags
.
isWebEnabled
&&
boolArg
(
'web-allow-expose-url'
),
webRunHeadless:
featureFlags
.
isWebEnabled
&&
boolArg
(
'web-run-headless'
),
webBrowserDebugPort:
browserDebugPort
,
...
...
packages/flutter_tools/lib/src/device.dart
View file @
563338a1
...
...
@@ -862,6 +862,7 @@ class DebuggingOptions {
this
.
webEnableExposeUrl
,
this
.
webUseSseForDebugProxy
=
true
,
this
.
webUseSseForDebugBackend
=
true
,
this
.
webUseSseForInjectedClient
=
true
,
this
.
webRunHeadless
=
false
,
this
.
webBrowserDebugPort
,
this
.
webEnableExpressionEvaluation
=
false
,
...
...
@@ -878,6 +879,7 @@ class DebuggingOptions {
this
.
webEnableExposeUrl
,
this
.
webUseSseForDebugProxy
=
true
,
this
.
webUseSseForDebugBackend
=
true
,
this
.
webUseSseForInjectedClient
=
true
,
this
.
webRunHeadless
=
false
,
this
.
webBrowserDebugPort
,
this
.
cacheSkSL
=
false
,
...
...
@@ -936,6 +938,7 @@ class DebuggingOptions {
final
bool
webEnableExposeUrl
;
final
bool
webUseSseForDebugProxy
;
final
bool
webUseSseForDebugBackend
;
final
bool
webUseSseForInjectedClient
;
/// Whether to run the browser in headless mode.
///
...
...
packages/flutter_tools/lib/src/isolated/devfs_web.dart
View file @
563338a1
...
...
@@ -51,6 +51,7 @@ typedef DwdsLauncher = Future<Dwds> Function(
String
hostname
,
bool
useSseForDebugProxy
,
bool
useSseForDebugBackend
,
bool
useSseForInjectedClient
,
bool
serveDevTools
,
UrlEncoder
urlEncoder
,
bool
spawnDds
});
...
...
@@ -172,6 +173,7 @@ class WebAssetServer implements AssetReader {
UrlTunneller
urlTunneller
,
bool
useSseForDebugProxy
,
bool
useSseForDebugBackend
,
bool
useSseForInjectedClient
,
BuildInfo
buildInfo
,
bool
enableDwds
,
bool
enableDds
,
...
...
@@ -274,6 +276,7 @@ class WebAssetServer implements AssetReader {
enableDebugging:
true
,
useSseForDebugProxy:
useSseForDebugProxy
,
useSseForDebugBackend:
useSseForDebugBackend
,
useSseForInjectedClient:
useSseForInjectedClient
,
serveDevTools:
false
,
loadStrategy:
FrontendServerRequireStrategyProvider
(
ReloadConfiguration
.
none
,
...
...
@@ -608,6 +611,7 @@ class WebDevFS implements DevFS {
@required
this
.
urlTunneller
,
@required
this
.
useSseForDebugProxy
,
@required
this
.
useSseForDebugBackend
,
@required
this
.
useSseForInjectedClient
,
@required
this
.
buildInfo
,
@required
this
.
enableDwds
,
@required
this
.
enableDds
,
...
...
@@ -626,6 +630,7 @@ class WebDevFS implements DevFS {
final
UrlTunneller
urlTunneller
;
final
bool
useSseForDebugProxy
;
final
bool
useSseForDebugBackend
;
final
bool
useSseForInjectedClient
;
final
BuildInfo
buildInfo
;
final
bool
enableDwds
;
final
bool
enableDds
;
...
...
@@ -704,6 +709,7 @@ class WebDevFS implements DevFS {
urlTunneller
,
useSseForDebugProxy
,
useSseForDebugBackend
,
useSseForInjectedClient
,
buildInfo
,
enableDwds
,
enableDds
,
...
...
packages/flutter_tools/lib/src/isolated/resident_web_runner.dart
View file @
563338a1
...
...
@@ -502,6 +502,7 @@ class ResidentWebRunner extends ResidentRunner {
urlTunneller:
_urlTunneller
,
useSseForDebugProxy:
debuggingOptions
.
webUseSseForDebugProxy
,
useSseForDebugBackend:
debuggingOptions
.
webUseSseForDebugBackend
,
useSseForInjectedClient:
debuggingOptions
.
webUseSseForInjectedClient
,
buildInfo:
debuggingOptions
.
buildInfo
,
enableDwds:
_enableDwds
,
enableDds:
!
debuggingOptions
.
disableDds
,
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
563338a1
...
...
@@ -228,6 +228,15 @@ abstract class FlutterCommand extends Command<void> {
'some proxy servers.'
,
hide:
!
verboseHelp
,
);
argParser
.
addOption
(
'web-server-debug-injected-client-protocol'
,
allowed:
<
String
>[
'sse'
,
'ws'
],
defaultsTo:
'sse'
,
help:
'The protocol (SSE or WebSockets) to use for the injected client '
'when using the Web Server device. '
'Using WebSockets can improve performance but may fail when connecting through '
'some proxy servers.'
,
hide:
!
verboseHelp
,
);
argParser
.
addFlag
(
'web-allow-expose-url'
,
defaultsTo:
false
,
help:
'Enables daemon-to-editor requests (app.exposeUrl) for exposing URLs '
...
...
packages/flutter_tools/test/general.shard/web/devfs_web_test.dart
View file @
563338a1
...
...
@@ -616,6 +616,7 @@ void main() {
urlTunneller:
null
,
useSseForDebugProxy:
true
,
useSseForDebugBackend:
true
,
useSseForInjectedClient:
true
,
nullAssertions:
true
,
nativeNullAssertions:
true
,
buildInfo:
const
BuildInfo
(
...
...
@@ -733,6 +734,7 @@ void main() {
urlTunneller:
null
,
useSseForDebugProxy:
true
,
useSseForDebugBackend:
true
,
useSseForInjectedClient:
true
,
nullAssertions:
true
,
nativeNullAssertions:
true
,
buildInfo:
const
BuildInfo
(
...
...
@@ -847,6 +849,7 @@ void main() {
urlTunneller:
null
,
useSseForDebugProxy:
true
,
useSseForDebugBackend:
true
,
useSseForInjectedClient:
true
,
buildInfo:
BuildInfo
.
debug
,
enableDwds:
false
,
enableDds:
false
,
...
...
@@ -891,6 +894,7 @@ void main() {
urlTunneller:
null
,
useSseForDebugProxy:
true
,
useSseForDebugBackend:
true
,
useSseForInjectedClient:
true
,
nullAssertions:
true
,
nativeNullAssertions:
true
,
buildInfo:
const
BuildInfo
(
...
...
@@ -943,6 +947,7 @@ void main() {
urlTunneller:
null
,
useSseForDebugProxy:
true
,
useSseForDebugBackend:
true
,
useSseForInjectedClient:
true
,
nullAssertions:
true
,
nativeNullAssertions:
true
,
buildInfo:
const
BuildInfo
(
...
...
@@ -979,6 +984,7 @@ void main() {
null
,
true
,
true
,
true
,
const
BuildInfo
(
BuildMode
.
debug
,
''
,
...
...
@@ -1061,6 +1067,7 @@ void main() {
urlTunneller:
null
,
useSseForDebugProxy:
true
,
useSseForDebugBackend:
true
,
useSseForInjectedClient:
true
,
nullAssertions:
true
,
nativeNullAssertions:
true
,
buildInfo:
BuildInfo
.
debug
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment