New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 885304 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 29
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 885313
issue 885307



Sign in to add a comment

determine if it's possible to launch service worker from external intent

Project Member Reported by hartma...@chromium.org, Sep 18

Issue description

see summary
 
Blocking: 885307
Blocking: 885313
I now realize now that I framed the question wrong. Sorry! For "picture share intents" we want to navigate the host browser. A service worker may or may not intercept that POST request. If the WebAPK is currently open, the share will clobber the page's current URL and navigate the main frame.

I checked. Chrome supports opening a new tab from a "form submit". To launch a WebAPK with a POST URL, you need to pass different params to Tab#loadUrl() in WebappActivity#initializeUI() and WebappActivity#onNewIntent(). One code path is run if the WebAPK is already running when it gets an intent. The other is run if the WebAPK is not running when it got the intent.

LoadUrlParams#createLoadHttpPostParams() looks useful. You still want to use PageTransition.AUTO_TOPLEVEL because it is more correct. One of the things that the page transition is used for is to determine whether to enable deep links for the navigation (in ExternalNavigationHandler.java)

Someone from //chrome/browser/ui/OWNERS should know whether you need to set extra LoadUrlParams parameters.

I hope that this helps


For the sake of completeness, I did notice weird behavior when going back to a page that I navigated to via POST for a test site I wrote. I did not notice the weird behavior when I tested using w3schools.

I assume that the problem is with my test site and that the server on my dev box is not correctly set up.
Status: Fixed (was: Untriaged)
implemented in https://chromium-review.googlesource.com/c/chromium/src/+/1271776

Sign in to add a comment