Spawn native Chrome on ChromeOS#600
Merged
DanTup merged 4 commits intoflutter:masterfrom Apr 29, 2019
Merged
Conversation
For ChromeOS users where everything is accessible on tunneled ports, we should use the ChromeOS browser (using Chrome.start() will attempt to run Chrome for Linux in the container). Fixes flutter#582.
This missing slash would break launching the native browser on ChromeOS since it would not realise the host/port was tunneled, and then (usually helpfully) replace the IP with the containers IP. This would only work if the service is listening on the main container IP.
jacob314
reviewed
Apr 29, 2019
| final bool _isChromeOS = new File('/dev/.cros_milestone').existsSync(); | ||
|
|
||
| bool _isAccessibleToChromeOSNativeBrowser(Uri uri) { | ||
| const tunneledPorts = { |
Contributor
There was a problem hiding this comment.
Add a TODO to switch to a set literal once we can/
Contributor
Author
There was a problem hiding this comment.
Done! Though I'm hoping we can delete this method before long (see the TODO further up) :-)
jacob314
approved these changes
Apr 29, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For ChromeOS users where everything is accessible on tunnelled ports, we should use the ChromeOS browser (using Chrome.start() will attempt to run Chrome for Linux in the container).
Also added a
/aspathin the URI we launch. Without this, Dart was generating a URL likehttp://127.0.0.1:8000?uri=xxx(there's no/for the path) which ChromeOS was failing to realise was a bound port, and then rewriting aspenguin.linux.testas we launched. We could've fixed this by adding a trailing slash todevToolsUrlbut it would be easy to regress, so this ensures this will never happen regardless of changes further up.(also removed a TODO that was done)
Fixes #582.