Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 709889 Make use of CCT UI for off-origin navigation of a standalone PWA
Starred by 10 users Project Member Reported by piotrs@chromium.org, Apr 10 Back to list
Status: Fixed
Owner:
Closed: Jul 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Task

Blocked on:
issue 740402
issue 726347


Show other hotlists

Hotlists containing this issue:
Hotlist-1
See-talk
Hotlist-1


Sign in to add a comment
Currently standalone and fullscreen PWAs show a "minibar" UI (WebappUrlBar in code). We want to replace it with Chrome Custom Tab UI, CustomTabToolbar in particular.

We believe this will be more usable (e.g. provides more features), prettier, and as a bonus will reduce number of UIs we have to maintain. Another bonus is that developers will have power of specifying the color of the toolbar, which will add to "I'm still in the app" feeling.
 
Status: Started
Comment 2 Deleted
Sorry, I was to excited and left useless comment. Can this be extended to target="_blank" navigations and window.open()? iOS's Safari standalone mode for example already does that: they open target="_blank" links in Safari Controller.

Having so for straight navigations is good of course, but probably not enough, unless can be detected and used as external navigation only in Chrome (but that hurts interoperability).
The plan is to also handle window.open() and target="_blank" once we have off-origin going. There are some interesting questions here too about whether we should also give developers or users the ability to control whether a _blank link opens in a CCT or in the native browser.
Project Member Comment 5 by bugdroid1@chromium.org, May 25
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7c7e9e600d256af4d2af1dbf68b59b030be0ab25

commit 7c7e9e600d256af4d2af1dbf68b59b030be0ab25
Author: piotrs <piotrs@chromium.org>
Date: Thu May 25 11:27:14 2017

Redirects off-origin navigations in an installed PWAs to a CustomTab.

This is done in order to improve UX by getting rid of a "minibar" toolbar
(to be done in a follow-up patch) and bring more app-like feel to PWAs.

In a long run this will help bring implementation of Minimal-UI, which requires
replacing "minibar" with a new "minimal-ui" toolbar.

BUG= 709889 

Review-Url: https://codereview.chromium.org/2829943002
Cr-Commit-Position: refs/heads/master@{#474625}

[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/java/AndroidManifest.xml
[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java
[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
[add] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInterceptNavigationDelegate.java
[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/java_sources.gni
[add] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java
[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java
[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestRule.java
[add] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java
[modify] https://crrev.com/7c7e9e600d256af4d2af1dbf68b59b030be0ab25/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/contextmenu/ContextMenuUtils.java

Project Member Comment 6 by bugdroid1@chromium.org, May 25
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/477e5841d63d6d2b7e548ac51a06e90d6915e72c

commit 477e5841d63d6d2b7e548ac51a06e90d6915e72c
Author: mahmadi <mahmadi@chromium.org>
Date: Thu May 25 14:32:38 2017

Revert of Redirecting off-origin navigations in PWAs to CCT. (patchset #14 id:580001 of https://codereview.chromium.org/2829943002/ )

Reason for revert:
This CL is likely the culprit for test failures:

https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Tests/builds/42079
https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Tests/builds/42080
https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Tests/builds/42081

Original issue's description:
> Redirects off-origin navigations in an installed PWAs to a CustomTab.
>
> This is done in order to improve UX by getting rid of a "minibar" toolbar
> (to be done in a follow-up patch) and bring more app-like feel to PWAs.
>
> In a long run this will help bring implementation of Minimal-UI, which requires
> replacing "minibar" with a new "minimal-ui" toolbar.
>
> BUG= 709889 
>
> Review-Url: https://codereview.chromium.org/2829943002
> Cr-Commit-Position: refs/heads/master@{#474625}
> Committed: https://chromium.googlesource.com/chromium/src/+/7c7e9e600d256af4d2af1dbf68b59b030be0ab25

TBR=dominickn@chromium.org,yusufo@chromium.org,pkotwicz@chromium.org,tedchoc@chromium.org,piotrs@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 709889 

Review-Url: https://codereview.chromium.org/2905073002
Cr-Commit-Position: refs/heads/master@{#474647}

[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/android/java/AndroidManifest.xml
[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java
[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
[delete] https://crrev.com/94a81dea3021d2e86673872e7b19ea0b684e614e/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInterceptNavigationDelegate.java
[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/android/java_sources.gni
[delete] https://crrev.com/94a81dea3021d2e86673872e7b19ea0b684e614e/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java
[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java
[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestRule.java
[delete] https://crrev.com/94a81dea3021d2e86673872e7b19ea0b684e614e/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java
[modify] https://crrev.com/477e5841d63d6d2b7e548ac51a06e90d6915e72c/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/contextmenu/ContextMenuUtils.java

Blockedon: 726347
Project Member Comment 8 by bugdroid1@chromium.org, May 26
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c271c0deaf103d5612078b3d0d81847819c5d52

commit 4c271c0deaf103d5612078b3d0d81847819c5d52
Author: piotrs <piotrs@chromium.org>
Date: Fri May 26 07:25:54 2017

Redirects off-origin navigations in an installed PWAs to a CustomTab.

This is done in order to improve UX by getting rid of a "minibar" toolbar
(to be done in a follow-up patch) and bring more app-like feel to PWAs.

In a long run this will help bring implementation of Minimal-UI, which requires
replacing "minibar" with a new "minimal-ui" toolbar.

BUG= 709889 

Review-Url: https://codereview.chromium.org/2829943002
Cr-Original-Commit-Position: refs/heads/master@{#474625}
Committed: https://chromium.googlesource.com/chromium/src/+/7c7e9e600d256af4d2af1dbf68b59b030be0ab25
Review-Url: https://codereview.chromium.org/2829943002
Cr-Commit-Position: refs/heads/master@{#474953}

[modify] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/java/AndroidManifest.xml
[modify] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
[modify] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java
[modify] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
[add] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInterceptNavigationDelegate.java
[modify] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
[modify] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/java_sources.gni
[add] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java
[modify] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java
[modify] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestRule.java
[add] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java
[modify] https://crrev.com/4c271c0deaf103d5612078b3d0d81847819c5d52/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/contextmenu/ContextMenuUtils.java

Project Member Comment 9 by bugdroid1@chromium.org, May 26
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0ed1a20ddb4f1e7020211d3328150d56fdda21a6

commit 0ed1a20ddb4f1e7020211d3328150d56fdda21a6
Author: guidou <guidou@chromium.org>
Date: Fri May 26 09:51:57 2017

Revert of Redirecting off-origin navigations in PWAs to CCT. (patchset #17 id:640001 of https://codereview.chromium.org/2829943002/ )

Reason for revert:
Suspect of breaking Android Tests bot.

First failure:
https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Tests/builds/42115

Will reland if the revert does not fix the bot.

Original issue's description:
> Redirects off-origin navigations in an installed PWAs to a CustomTab.
>
> This is done in order to improve UX by getting rid of a "minibar" toolbar
> (to be done in a follow-up patch) and bring more app-like feel to PWAs.
>
> In a long run this will help bring implementation of Minimal-UI, which requires
> replacing "minibar" with a new "minimal-ui" toolbar.
>
> BUG= 709889 
>
> Review-Url: https://codereview.chromium.org/2829943002
> Cr-Original-Commit-Position: refs/heads/master@{#474625}
> Committed: https://chromium.googlesource.com/chromium/src/+/7c7e9e600d256af4d2af1dbf68b59b030be0ab25
> Review-Url: https://codereview.chromium.org/2829943002
> Cr-Commit-Position: refs/heads/master@{#474953}
> Committed: https://chromium.googlesource.com/chromium/src/+/4c271c0deaf103d5612078b3d0d81847819c5d52

TBR=dominickn@chromium.org,yusufo@chromium.org,pkotwicz@chromium.org,tedchoc@chromium.org,piotrs@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 709889 

Review-Url: https://codereview.chromium.org/2906043002
Cr-Commit-Position: refs/heads/master@{#474976}

[modify] https://crrev.com/0ed1a20ddb4f1e7020211d3328150d56fdda21a6/chrome/android/java/AndroidManifest.xml
[modify] https://crrev.com/0ed1a20ddb4f1e7020211d3328150d56fdda21a6/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
[modify] https://crrev.com/0ed1a20ddb4f1e7020211d3328150d56fdda21a6/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/0ed1a20ddb4f1e7020211d3328150d56fdda21a6/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java
[modify] https://crrev.com/0ed1a20ddb4f1e7020211d3328150d56fdda21a6/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
[delete] https://crrev.com/2675d3c72d3ad2257e6efb8775b1c54266ccfb7e/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInterceptNavigationDelegate.java
[modify] https://crrev.com/0ed1a20ddb4f1e7020211d3328150d56fdda21a6/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
[modify] https://crrev.com/0ed1a20ddb4f1e7020211d3328150d56fdda21a6/chrome/android/java_sources.gni
[delete] https://crrev.com/2675d3c72d3ad2257e6efb8775b1c54266ccfb7e/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java
[modify] https://crrev.com/0ed1a20ddb4f1e7020211d3328150d56fdda21a6/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java
[modify] https://crrev.com/0ed1a20ddb4f1e7020211d3328150d56fdda21a6/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestRule.java
[delete] https://crrev.com/2675d3c72d3ad2257e6efb8775b1c54266ccfb7e/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java
[modify] https://crrev.com/0ed1a20ddb4f1e7020211d3328150d56fdda21a6/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/contextmenu/ContextMenuUtils.java

Project Member Comment 10 by bugdroid1@chromium.org, May 29
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/49753ec593d5cd5e2faab80397058b15bdfb2089

commit 49753ec593d5cd5e2faab80397058b15bdfb2089
Author: piotrs <piotrs@chromium.org>
Date: Mon May 29 01:54:43 2017

Redirects off-origin navigations in an installed PWAs to a CustomTab.

This is done in order to improve UX by getting rid of a "minibar" toolbar
(to be done in a follow-up patch) and bring more app-like feel to PWAs.

In a long run this will help bring implementation of Minimal-UI, which requires
replacing "minibar" with a new "minimal-ui" toolbar.

BUG= 709889 

Review-Url: https://codereview.chromium.org/2829943002
Cr-Original-Original-Commit-Position: refs/heads/master@{#474625}
Committed: https://chromium.googlesource.com/chromium/src/+/7c7e9e600d256af4d2af1dbf68b59b030be0ab25
Review-Url: https://codereview.chromium.org/2829943002
Cr-Original-Commit-Position: refs/heads/master@{#474953}
Committed: https://chromium.googlesource.com/chromium/src/+/4c271c0deaf103d5612078b3d0d81847819c5d52
Review-Url: https://codereview.chromium.org/2829943002
Cr-Commit-Position: refs/heads/master@{#475274}

[modify] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/java/AndroidManifest.xml
[modify] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
[modify] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java
[add] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInterceptNavigationDelegate.java
[modify] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
[modify] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/java_sources.gni
[add] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/TopActivityListener.java
[modify] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java
[modify] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestRule.java
[add] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java
[modify] https://crrev.com/49753ec593d5cd5e2faab80397058b15bdfb2089/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/contextmenu/ContextMenuUtils.java

Cc: pkotw...@chromium.org hanxi@chromium.org benwells@chromium.org yfried...@chromium.org
 Issue 624236  has been merged into this issue.
Can it be already tested in Canary?
Not sure if canary has been updated, worth a shot today, otherwise it'll happen tomorrow
I tried in Canary today but it doesn't work. Do I need some specific flag enabled apart from "Improved Add To Homescreen" (WebAPK) and "Experimental Web Platform Features"?
No flag is required, it should just work. Note that this as of now only works for links without target="_blank". It does not work for window.open(url) call, but works for window.top.location = url.
Project Member Comment 16 by bugdroid1@chromium.org, Jun 17
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4d9776c156c177107053872a437a9639d95a7160

commit 4d9776c156c177107053872a437a9639d95a7160
Author: piotrs <piotrs@chromium.org>
Date: Sat Jun 17 09:48:03 2017

Redirects _blank and window.open() off-origin navigation from PWA to CCT.

Custom Tab opened from a _blank link or a window.open() call is opened in
a separate Android task to mimic a new window/blank context of a web browser.
This is done in order to improve UX and bring more app-like feel to PWAs.
Transition to CCT for regular navigation is already done
(codereview.chromium.org/2829943002), this patch brings the same to _blank
and window.open().

This requires some changes to Custom Tabs, as WebContents for the new window
is already created when we get to Java layer. I replicated the trick from
ChromeTabCreator with remembering WebContents on AsyncTabParamsManager
during the transition.

Tests asserting that _blank and window.open() are opened in TabbedChrome has
been removed from WebappModeTest. Tests for transition to CCT has been added
to WebappNavigationTest.

On Lollipop and above we maintain at most one CCT task per installed Webapp.
Below Lollipop there is no API I could use to enforce that I think, let me
know if you know the way.

BUG= 709889 

Review-Url: https://codereview.chromium.org/2898373002
Cr-Commit-Position: refs/heads/master@{#480286}

[modify] https://crrev.com/4d9776c156c177107053872a437a9639d95a7160/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
[modify] https://crrev.com/4d9776c156c177107053872a437a9639d95a7160/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
[modify] https://crrev.com/4d9776c156c177107053872a437a9639d95a7160/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
[add] https://crrev.com/4d9776c156c177107053872a437a9639d95a7160/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java
[modify] https://crrev.com/4d9776c156c177107053872a437a9639d95a7160/chrome/android/java_sources.gni
[modify] https://crrev.com/4d9776c156c177107053872a437a9639d95a7160/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappModeTest.java
[modify] https://crrev.com/4d9776c156c177107053872a437a9639d95a7160/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java
[modify] https://crrev.com/4d9776c156c177107053872a437a9639d95a7160/tools/metrics/histograms/enums.xml

Labels: -M-60 M-61
Status: Fixed
This is done now, will go out in m61.
Great! Still waiting Canary on Android to release with latest patch from here. I'll let you know if it works in my cases when I'll be able to test it :-)
Testing it now, but it doesn't look as good as with native apps:

* It opens something like new activity or something like that -- CCT opens as new app from bottom while PWA is scaling down. In all native apps I saw CCT was sliding from the right side looking like it's a part of the app.
* CCT doesn't preserve PWA's theme-color and doesn't either use there-color of opened webpage. I think it should use theme-color (from manifest.json, not from in-page meta tag) of the **PWA** 
With the current implementation CCT will behave the way you describe it (themed, the same android task) if links are specified without target="_blank". For _blank links and window.open() calls we propose starting a new Android task that is not themed with PWA colors. I understand this is not what you expected, thank you for your feedback! We are still discussing what is right thing to do here. 
As it's now it's for sure better than nothing, so thanks for implementing it :-)

I see why current behavior for _blank pages might be useful: ads opened with it shouldn't really like they are part of the PWA. 
I tested this a bit further and it turns out that with this features added Chrome stopped opening external links other apps. For example twitter/youtube/google maps links previously would be opened in its native app  if the one is installed, but now everything is being opened in CCT.

This is clearly a regression to me.

(now sure how other browsers behave here, e.g. Safari, but iOS home screen webapps are so poor and bad so I'm sure if that is even a good example)
Status: Started
Thanks for reporting, indeed I haven't tested this scenario.

Reopening the bug and will look into it ASAP.
Also one more note (might be useful to know too):

Previously, only when one specify rel="noopener" on a link, it was opening the link Chrome. Example:

<a href="https://youtube.com/channel/..." target="_blank">Youtube</a> -- this would open native app. 

<a href="https://youtube.com/channel/..." target="_blank" rel="noopener">Youtube</a> -- this would NOT open a native app, but rather open the link in Chrome.

With CCT feature it always opens in CCT. I can file a separate bug for rel="noopener" if that makes sense. That might not be a bug though, I'm not sure, but I haven't found any specs/docs about such specific behavior.
Great function~

I think CCT theme-color should use page meta tag, this allows dynamically modify the theme color;

when port is inconsistent should open in CCT


Blockedon: 740402
FYI I've split the handling of _blank links by external apps into a separate bug: crbug.com/740402.
Hi 594mantou:

Re inconsistent port: I think it would open in CCT in such case, as it's different origin.

Re page meta tag: We want to standardize on Web App Manifest as a source of truth about app metadata, so I don't see us implementing this unless there's a really good reason.
Status: Fixed
I consider the basic version of this feature to be done so I will close this bug. If there are any specific feature requests, improvement or bugs please create a separate bug for them.
Thank you!
Issue 742449 has been merged into this issue.
Sign in to add a comment