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}
Showing
Please register or sign in to comment