New issue
Advanced search Search tips

Issue 918459 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 920729

Blocking:
issue 901954



Sign in to add a comment

Make WebApkActivity launch splash screen activity while page is loading

Project Member Reported by pkotwicz@google.com, Jan 2

Issue description

Make WebApkActivity launch splash screen activity while page is loading


 
Blocking: 901954
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be573a593a449afcee4960e5e36eef27902396f1

commit be573a593a449afcee4960e5e36eef27902396f1
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Tue Jan 08 02:52:36 2019

[Android WebAPK] Launch splash screen on top of web contents 1/4

This CL changes new-style WebAPKs to launch a splash screen both below
and above the host browser.
- The splash activity stacked below the host browser
  (SplashActivity.java) exists to show the splash screen to the user
  faster.
- The splash activity stacked above the host browser exists to hide the
  web contents till the page has finished loading. In a follow up CL,
  I will make SameTaskWebApkActivity singleTop and make
  SameTaskWebApkActivity send itself an intent in order to hide the
  splash screen.

The credit for the idea for this CL goes to pshmakov@. He outlined
the idea of launching a splash screen activity to hide the web contents
while the page is loading in https://goo.gl/iDCyN7
This approach is a lot easier to implement and is less ugly than making Chrome
transparent.

This CL also:
- Makes WebappActivities/WebApkActivities translucent. This is necessary in
  order to make the transition smooth but increases the time to first
  contentful paint by 50ms. See this doc - https://goo.gl/YXv5Sy -
  for more details
- Renames WebApkInfo#useTransparentSplash() to
  WebApkInfo#isSplashProvidedByWebApk()
- Renames TransparentSplashWebApkActivity to SameTaskWebApkActivity

BUG=918459

Change-Id: I4c3219ba949a7f9ea4b206be71a4d6ab6eb8763e
Reviewed-on: https://chromium-review.googlesource.com/c/1393103
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620591}
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/java/AndroidManifest.xml
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/java/res/values-v17/styles.xml
[add] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/java/src/org/chromium/chrome/browser/webapps/SameTaskWebApkActivity.java
[delete] https://crrev.com/03c190c7f46227b627a6d9bceea854ff0b079383/chrome/android/java/src/org/chromium/chrome/browser/webapps/TransparentSplashWebApkActivity.java
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateDataFetcher.java
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/java_sources.gni
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/junit/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationUnitTest.java
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkConstants.java
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/webapk/shell_apk/AndroidManifest.xml
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/webapk/shell_apk/BUILD.gn
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/webapk/shell_apk/current_version/current_version.gni
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/webapk/shell_apk/res_h2o/values-v17/styles.xml
[modify] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/h2o/H2OLauncher.java
[add] https://crrev.com/be573a593a449afcee4960e5e36eef27902396f1/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/h2o/OverlaySplashActivity.java

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/95ad83cedf394b9b37a8b3ab151116918b8f64ec

commit 95ad83cedf394b9b37a8b3ab151116918b8f64ec
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Tue Jan 08 22:56:05 2019

[Android WebAPK] Launch splash screen on top of web contents 2/4

This CL refactors WebappLauncherActivity in order to launch the
first run experience from WebappLauncherActivity instead of
WebApkActivity.

This change is desirable because:
- we want to launch the FRE prior to launching.
  OverlaySplashScreenActivity does not have any FRE-specific logic.
- This is in preparation for making SameTaskWebApkActivity singleTop.
  A singleTop activity cannot be relaunched on top itself (Intent#onNewIntent()
  is called instead.)

BUG=918459

Change-Id: Idd04f5534f7abc6a561a20273daa70d9b970d109
Reviewed-on: https://chromium-review.googlesource.com/c/1394936
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620919}
[modify] https://crrev.com/95ad83cedf394b9b37a8b3ab151116918b8f64ec/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java
[modify] https://crrev.com/95ad83cedf394b9b37a8b3ab151116918b8f64ec/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java
[modify] https://crrev.com/95ad83cedf394b9b37a8b3ab151116918b8f64ec/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/95ad83cedf394b9b37a8b3ab151116918b8f64ec/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
[modify] https://crrev.com/95ad83cedf394b9b37a8b3ab151116918b8f64ec/chrome/android/java_sources.gni
[modify] https://crrev.com/95ad83cedf394b9b37a8b3ab151116918b8f64ec/chrome/android/junit/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationUnitTest.java
[add] https://crrev.com/95ad83cedf394b9b37a8b3ab151116918b8f64ec/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappLauncherActivityTest.java

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb4ca880929f17986912657ebef625555be4bc04

commit fb4ca880929f17986912657ebef625555be4bc04
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Wed Jan 09 03:50:54 2019

[Android WebAPK Refactor] Remove WebappActivity#getActivityType()

This CL removes WebappActivity changes which were made to accommodate
TWAs launching a WebappActivity. This CL:
- Removes WebappActivity#getActivityType() calls with
  WebappInfo#isForWebApk() calls
- Renames WebappActivity#getNativeClientPackageName() to
  WebappActivity#getWebApkPackageName()

BUG=918459

Change-Id: I70e12e1b87d5f86821a78815736e50e8c8a4af31
Reviewed-on: https://chromium-review.googlesource.com/c/1396299
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621038}
[modify] https://crrev.com/fb4ca880929f17986912657ebef625555be4bc04/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/fb4ca880929f17986912657ebef625555be4bc04/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateTask.java
[modify] https://crrev.com/fb4ca880929f17986912657ebef625555be4bc04/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
[modify] https://crrev.com/fb4ca880929f17986912657ebef625555be4bc04/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDisclosureSnackbarController.java
[modify] https://crrev.com/fb4ca880929f17986912657ebef625555be4bc04/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java
[modify] https://crrev.com/fb4ca880929f17986912657ebef625555be4bc04/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java
[modify] https://crrev.com/fb4ca880929f17986912657ebef625555be4bc04/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDisclosureSnackbarControllerTest.java

Blockedon: 920729
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1659b93ac4fea75233dd6db9dae83cc020ae9918

commit 1659b93ac4fea75233dd6db9dae83cc020ae9918
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Wed Jan 16 02:00:32 2019

[Android Webapp] Fix enum annotations in WebappSplashScreenController 1/6

This CL moves SplashScreenHidesReason from WebappUma to
SplashscreenObserver and adds missing @IntDef annotations

BUG=918459
R=dominickn, asvitkine
TBR=yfriedman for trivial metrics/ changes

Change-Id: Ia48904f537c7b7c4c2a79d3d30bc4d80f06bcc42
Reviewed-on: https://chromium-review.googlesource.com/c/1407127
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623019}
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkSplashscreenMetrics.java
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebappUma.java
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/chrome/android/java/src/org/chromium/chrome/browser/webapps/SplashscreenObserver.java
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenBackgroundColorTest.java
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenHomescreenIconTest.java
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenIconTest.java
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenTest.java
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenThemeColorTest.java
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/1659b93ac4fea75233dd6db9dae83cc020ae9918/tools/metrics/histograms/histograms.xml

Project Member

Comment 7 by bugdroid1@chromium.org, Jan 16 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9c9827880c1e5f9d5db85192485bdc1a8ca75746

commit 9c9827880c1e5f9d5db85192485bdc1a8ca75746
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Wed Jan 16 20:00:06 2019

[Android Webapp] Centralize WebappSplashscreen UMA recording 2/6

This CL introduces a new function just for recording UMA metrics
WebappSplashScreenController#recordUma() moves all of
WebappSplashScreenController's UMA recording into the function.

R=dominickn
TBR=yfriedman (for WebappUma changes)

BUG=918459

Change-Id: I947bf83ff5bfc991f3e92d5b881e48c2f0c1004b
Reviewed-on: https://chromium-review.googlesource.com/c/1407373
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623338}
[modify] https://crrev.com/9c9827880c1e5f9d5db85192485bdc1a8ca75746/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebappUma.java
[modify] https://crrev.com/9c9827880c1e5f9d5db85192485bdc1a8ca75746/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java

Project Member

Comment 8 by bugdroid1@chromium.org, Jan 17 (5 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4a3dd4e62e5ca16f7918b4d7a97c375e7175d187

commit 4a3dd4e62e5ca16f7918b4d7a97c375e7175d187
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Thu Jan 17 16:07:00 2019

[Android WebAPK] Cleanup WebappOfflineDialog now that TWAs do not use it 3/6

TWAs no longer use WebappActivity nor WebappOfflineDialog. This CL:
- Renames WebappOfflineDialog to WebApkOfflineDialog
- Renames the dialog's string resources to use the 'webapk' prefix
- Removes unused IDS_WEBAPP_TWA_OFFLINE_DIALOG

BUG=918459
R=dominickn
TBR=dominickn
NOPRESUBMIT=true (To bypass AlertDialoga.Builder check)

Change-Id: Ia071e2561eff6d8ef08fbe8ab443c43491a13458
Reviewed-on: https://chromium-review.googlesource.com/c/1407380
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623701}
[rename] https://crrev.com/4a3dd4e62e5ca16f7918b4d7a97c375e7175d187/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkOfflineDialog.java
[modify] https://crrev.com/4a3dd4e62e5ca16f7918b4d7a97c375e7175d187/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java
[modify] https://crrev.com/4a3dd4e62e5ca16f7918b4d7a97c375e7175d187/chrome/android/java/strings/android_chrome_strings.grd
[add] https://crrev.com/4a3dd4e62e5ca16f7918b4d7a97c375e7175d187/chrome/android/java/strings/android_chrome_strings_grd/IDS_WEBAPK_CANNOT_CONNECT_TO_SITE.png.sha1
[add] https://crrev.com/4a3dd4e62e5ca16f7918b4d7a97c375e7175d187/chrome/android/java/strings/android_chrome_strings_grd/IDS_WEBAPK_NETWORK_ERROR_MESSAGE_TUNNEL_CONNECTION_FAILED.png.sha1
[add] https://crrev.com/4a3dd4e62e5ca16f7918b4d7a97c375e7175d187/chrome/android/java/strings/android_chrome_strings_grd/IDS_WEBAPK_OFFLINE_DIALOG.png.sha1
[modify] https://crrev.com/4a3dd4e62e5ca16f7918b4d7a97c375e7175d187/chrome/android/java_sources.gni

Project Member

Comment 9 by bugdroid1@chromium.org, Jan 17 (5 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f290a68fc2b9acb1496cc09a7f29521e3398b45

commit 1f290a68fc2b9acb1496cc09a7f29521e3398b45
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Thu Jan 17 22:53:35 2019

[Android Webapp] Make all callers call same method to hide splash screen 4/6

This CL makes all callers call one method -
WebappSplashScreenController#hideSplash() - to hide the splash screen.
Previously, callers would call either hideSplashScreenOnDrawingFinished() or
animateHidingSplashScreen()

BUG=918459

Change-Id: Iacbadf4d7ec2ee3af19db23c05253fbec89ed15d
Reviewed-on: https://chromium-review.googlesource.com/c/1407589
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623886}
[modify] https://crrev.com/1f290a68fc2b9acb1496cc09a7f29521e3398b45/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java

Project Member

Comment 10 by bugdroid1@chromium.org, Yesterday (38 hours ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/329adb9bf13182323b168792ec6fdb5e51b6aac0

commit 329adb9bf13182323b168792ec6fdb5e51b6aac0
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Mon Jan 21 16:24:39 2019

[Android Webapp] Move post-native UMA out of WebappUma 5/8

This CL splits out Webapp.Splashscreen.Hides and
Webapp.Splashscreen.Duration out of WebappUma and into
WebappSplashScreenController

These UMA metrics are different from the other WebappUma metrics because:
- They will be recorded for new style-WebAPKs. The other UMA metrics
  in WebappUma won't.
- They are always recorded after native is loaded.

R=dominickn
TBR=yfriedman for WebappUma changes

BUG=918459

Change-Id: Ic1b583f1b0c57c59bdffb3f19a690f82ee36cb34
Reviewed-on: https://chromium-review.googlesource.com/c/1424602
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624600}
[modify] https://crrev.com/329adb9bf13182323b168792ec6fdb5e51b6aac0/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkSplashscreenMetrics.java
[modify] https://crrev.com/329adb9bf13182323b168792ec6fdb5e51b6aac0/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebappUma.java
[modify] https://crrev.com/329adb9bf13182323b168792ec6fdb5e51b6aac0/chrome/android/java/src/org/chromium/chrome/browser/webapps/SplashscreenObserver.java
[modify] https://crrev.com/329adb9bf13182323b168792ec6fdb5e51b6aac0/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java
[modify] https://crrev.com/329adb9bf13182323b168792ec6fdb5e51b6aac0/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenTest.java

Sign in to add a comment