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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java

Issue 2071213005: Use metadata when launching WebAPKs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add WebAPK's metadata in WebappDataStorage. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
index 05eb9169f62e4dacc5bfc7ee434a5a581f6faad1..f4b93556da9273031662c703bbaf6728c74d5266 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
@@ -62,7 +62,7 @@ public class WebappActivity extends FullScreenActivity {
private final WebappDirectoryManager mDirectoryManager;
- private WebappInfo mWebappInfo;
+ protected WebappInfo mWebappInfo;
private boolean mOldWebappCleanupStarted;
@@ -244,8 +244,12 @@ public class WebappActivity extends FullScreenActivity {
return mWebappInfo;
}
- private void initializeWebappData() {
- final int backgroundColor = ColorUtils.getOpaqueColor(mWebappInfo.backgroundColor(
+ protected void initializeWebappData() {
+ initializeSplashScreenWidgets(initializeWebappDataInternal());
+ }
+
+ protected int initializeWebappDataInternal() {
+ int backgroundColor = ColorUtils.getOpaqueColor(mWebappInfo.backgroundColor(
ApiCompatibilityUtils.getColor(getResources(), R.color.webapp_default_bg)));
mSplashScreen = new FrameLayout(this);
@@ -261,11 +265,10 @@ public class WebappActivity extends FullScreenActivity {
mWebappUma.recordSplashscreenThemeColor(mWebappInfo.hasValidThemeColor()
? WebappUma.SPLASHSCREEN_COLOR_STATUS_CUSTOM
: WebappUma.SPLASHSCREEN_COLOR_STATUS_DEFAULT);
pkotwicz 2016/06/20 18:26:14 This seems out of place. We should: 1) fetch the t
Xi Han 2016/06/22 15:55:28 Good catch. Move the setThemeColor() before setBac
-
- initializeSplashScreenWidgets(backgroundColor);
+ return backgroundColor;
}
- protected void initializeSplashScreenWidgets(final int backgroundColor) {
+ private void initializeSplashScreenWidgets(final int backgroundColor) {
final Intent intent = getIntent();
WebappRegistry.getWebappDataStorage(this, mWebappInfo.id(),
new WebappRegistry.FetchWebappDataStorageCallback() {

Powered by Google App Engine
This is Rietveld 408576698