Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

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

Created:
3 years, 7 months ago by piotrs
Modified:
3 years, 6 months ago
Reviewers:
dominickn, Yusuf, gone
CC:
chromium-reviews, dominickn+watch_chromium.org, lizeb+watch-custom-tabs_chromium.org, pkotwicz+watch_chromium.org, asvitkine+watch_chromium.org, agrieve+watch_chromium.org, zpeng+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

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-Original-Commit-Position: refs/heads/master@{#480286} Committed: https://chromium.googlesource.com/chromium/src/+/4d9776c156c177107053872a437a9639d95a7160 Review-Url: https://codereview.chromium.org/2898373002 Cr-Commit-Position: refs/heads/master@{#480612} Committed: https://chromium.googlesource.com/chromium/src/+/e1753b5ae0c9972faf0da0b2138fb9b92c3db2e8

Patch Set 1 : Initial Patch #

Total comments: 2

Patch Set 2 : Moved EXTRA_AFFILIATED_WEBAPP_ID to WebappTabDelegate #

Patch Set 3 : Reverted closing CCTs in separate tasks when opening a new one #

Patch Set 4 : Merge #

Total comments: 4

Patch Set 5 : Addressed comments #

Total comments: 6

Patch Set 6 : Second round of comments #

Patch Set 7 : Merge #

Patch Set 8 : Merge #

Patch Set 9 : Merge #

Patch Set 10 : Removes assertions on number of Chrome tasks in Recents #

Patch Set 11 : Merge #

Messages

Total messages: 108 (69 generated)
piotrs
Hi folks, I've got another PWA -> CCT redirect patch. @Yusuf: Can you please take ...
3 years, 6 months ago (2017-05-30 06:32:45 UTC) #23
dominickn
Looks pretty good at first pass! https://codereview.chromium.org/2898373002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java File chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java (right): https://codereview.chromium.org/2898373002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java#newcode87 chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java:87: public static final ...
3 years, 6 months ago (2017-05-30 06:51:53 UTC) #24
piotrs
Thanks Dom, done. https://codereview.chromium.org/2898373002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java File chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java (right): https://codereview.chromium.org/2898373002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java#newcode87 chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java:87: public static final String EXTRA_AFFILIATED_WEBAPP_ID = ...
3 years, 6 months ago (2017-05-30 07:01:40 UTC) #25
pkotwicz
This CL is exciting. So I tested it. It looks like if the CCT tries ...
3 years, 6 months ago (2017-05-30 16:48:53 UTC) #26
piotrs
On 2017/05/30 16:48:53, pkotwicz wrote: > This CL is exciting. So I tested it. It ...
3 years, 6 months ago (2017-05-30 23:50:39 UTC) #27
dominickn
window.open() from a CCT is an interesting question. What is the default behaviour for, say, ...
3 years, 6 months ago (2017-05-31 01:56:10 UTC) #28
piotrs
On 2017/05/31 01:56:10, dominickn wrote: > window.open() from a CCT is an interesting question. What ...
3 years, 6 months ago (2017-05-31 04:41:41 UTC) #29
pkotwicz
yusufo@ do you have a strong opinion w.r.t comment #29? I personally don't have a ...
3 years, 6 months ago (2017-05-31 15:28:46 UTC) #34
Yusuf
On 2017/05/31 15:28:46, pkotwicz wrote: > yusufo@ do you have a strong opinion w.r.t comment ...
3 years, 6 months ago (2017-05-31 18:45:27 UTC) #35
piotrs
Few comments: @Peter: We might be talking about different things, you wrote "if the CCT ...
3 years, 6 months ago (2017-06-01 08:25:08 UTC) #36
pkotwicz
@piotrs: I meant what occurs when a PWA uses window.open() to open a CCT. The ...
3 years, 6 months ago (2017-06-01 15:21:15 UTC) #37
Yusuf
On 2017/06/01 15:21:15, pkotwicz wrote: > @piotrs: I meant what occurs when a PWA uses ...
3 years, 6 months ago (2017-06-01 21:16:20 UTC) #38
piotrs
@Peter: What happens while you're inside CCT is not in my control. @Yusuf: Indeed in ...
3 years, 6 months ago (2017-06-01 23:45:17 UTC) #39
piotrs
On 2017/06/01 23:45:17, piotrs wrote: > @Peter: What happens while you're inside CCT is not ...
3 years, 6 months ago (2017-06-02 04:20:15 UTC) #40
dominickn
Both of those feel a bit confusing to me, but having the title controlled by ...
3 years, 6 months ago (2017-06-02 04:34:50 UTC) #41
piotrs
For completeness, screenshots with 3 options (no styling, icon + color, icon + color + ...
3 years, 6 months ago (2017-06-02 05:13:31 UTC) #42
piotrs
On 2017/06/02 05:13:31, piotrs wrote: > For completeness, screenshots with 3 options (no styling, icon ...
3 years, 6 months ago (2017-06-05 00:15:58 UTC) #43
Yusuf
On 2017/06/05 00:15:58, piotrs wrote: > On 2017/06/02 05:13:31, piotrs wrote: > > For completeness, ...
3 years, 6 months ago (2017-06-05 16:42:50 UTC) #44
piotrs
On 2017/06/05 16:42:50, Yusuf wrote: > On 2017/06/05 00:15:58, piotrs wrote: > > On 2017/06/02 ...
3 years, 6 months ago (2017-06-09 01:45:37 UTC) #45
piotrs
Ping, any chance we could move forward with this patch? Thanks!
3 years, 6 months ago (2017-06-14 11:42:52 UTC) #52
Yusuf
overall it looks good. Lets change the way we handle async web contents a bit ...
3 years, 6 months ago (2017-06-14 18:53:10 UTC) #53
dominickn
webapps lgtm % yusufo's suggestions.
3 years, 6 months ago (2017-06-15 00:41:01 UTC) #54
piotrs
Addressed comments + removed CCT toolbar styling based on PWA theme color, as decided with ...
3 years, 6 months ago (2017-06-15 06:25:32 UTC) #57
piotrs
Replies to comments here :) https://codereview.chromium.org/2898373002/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java File chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java (right): https://codereview.chromium.org/2898373002/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java#newcode594 chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java:594: if (asyncParams != null ...
3 years, 6 months ago (2017-06-15 06:26:16 UTC) #58
Yusuf
Thanks so much for all the due diligence about this review. I really appreciate your ...
3 years, 6 months ago (2017-06-15 16:15:56 UTC) #61
piotrs
Thanks for comments, done as suggested! https://codereview.chromium.org/2898373002/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java File chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java (right): https://codereview.chromium.org/2898373002/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java#newcode612 chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java:612: } else if ...
3 years, 6 months ago (2017-06-15 23:28:21 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2898373002/200001
3 years, 6 months ago (2017-06-15 23:30:36 UTC) #66
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/238815)
3 years, 6 months ago (2017-06-15 23:36:37 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2898373002/220001
3 years, 6 months ago (2017-06-16 01:52:43 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2898373002/220001
3 years, 6 months ago (2017-06-16 03:30:57 UTC) #77
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/465625)
3 years, 6 months ago (2017-06-16 03:40:50 UTC) #79
piotrs
Hi Dan, Could you please take a look on TabDelegate change? Cheers! Piotr
3 years, 6 months ago (2017-06-16 03:48:40 UTC) #81
gone
TabDelegate lgtm
3 years, 6 months ago (2017-06-16 16:26:45 UTC) #82
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2898373002/240001
3 years, 6 months ago (2017-06-17 05:57:24 UTC) #91
commit-bot: I haz the power
Committed patchset #9 (id:240001) as https://chromium.googlesource.com/chromium/src/+/4d9776c156c177107053872a437a9639d95a7160
3 years, 6 months ago (2017-06-17 09:48:22 UTC) #96
johnme
Sorry, reverting this in https://codereview.chromium.org/2950483002 because of failing tests.
3 years, 6 months ago (2017-06-19 10:42:01 UTC) #97
piotrs
My testing of number of Chrome tasks in recents turned out to not be deterministic ...
3 years, 6 months ago (2017-06-19 21:01:12 UTC) #101
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2898373002/280001
3 years, 6 months ago (2017-06-19 21:48:31 UTC) #105
commit-bot: I haz the power
3 years, 6 months ago (2017-06-19 22:48:26 UTC) #108
Message was sent while issue was closed.
Committed patchset #11 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/e1753b5ae0c9972faf0da0b2138f...

Powered by Google App Engine
This is Rietveld 408576698