| Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
|
| index 629b0743940866871ec9a4ba9eaad0606a0a6bba..682eaa60d835fd03ad23377a90a33857691de2eb 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
|
| @@ -34,6 +34,7 @@ public class WebappInfo {
|
| private long mBackgroundColor;
|
| private boolean mIsIconGenerated;
|
| private String mWebApkPackageName;
|
| + private String mWebManifestUrl;
|
|
|
| public static WebappInfo createEmpty() {
|
| return new WebappInfo();
|
| @@ -134,9 +135,11 @@ public class WebappInfo {
|
| String shortName = shortNameFromIntent(intent);
|
| String webApkPackageName = IntentUtils.safeGetStringExtra(intent,
|
| ShortcutHelper.EXTRA_WEBAPK_PACKAGE_NAME);
|
| + String webManifestUrl = IntentUtils.safeGetStringExtra(intent,
|
| + ShortcutHelper.EXTRA_WEB_MANIFEST_URL);
|
|
|
| return create(id, url, icon, name, shortName, displayMode, orientation, source,
|
| - themeColor, backgroundColor, isIconGenerated, webApkPackageName);
|
| + themeColor, backgroundColor, isIconGenerated, webApkPackageName, webManifestUrl);
|
| }
|
|
|
| /**
|
| @@ -156,7 +159,8 @@ public class WebappInfo {
|
| */
|
| public static WebappInfo create(String id, String url, String icon, String name,
|
| String shortName, int displayMode, int orientation, int source, long themeColor,
|
| - long backgroundColor, boolean isIconGenerated, String webApkPackageName) {
|
| + long backgroundColor, boolean isIconGenerated, String webApkPackageName,
|
| + String webManifestUrl) {
|
| if (id == null || url == null) {
|
| Log.e("WebappInfo", "Data passed in was incomplete: " + id + ", " + url);
|
| return null;
|
| @@ -164,12 +168,13 @@ public class WebappInfo {
|
|
|
| Uri uri = Uri.parse(url);
|
| return new WebappInfo(id, uri, icon, name, shortName, displayMode, orientation, source,
|
| - themeColor, backgroundColor, isIconGenerated, webApkPackageName);
|
| + themeColor, backgroundColor, isIconGenerated, webApkPackageName, webManifestUrl);
|
| }
|
|
|
| private WebappInfo(String id, Uri uri, String encodedIcon, String name, String shortName,
|
| int displayMode, int orientation, int source, long themeColor,
|
| - long backgroundColor, boolean isIconGenerated, String webApkPackageName) {
|
| + long backgroundColor, boolean isIconGenerated, String webApkPackageName,
|
| + String webManifestUrl) {
|
| mEncodedIcon = encodedIcon;
|
| mId = id;
|
| mName = name;
|
| @@ -183,6 +188,7 @@ public class WebappInfo {
|
| mIsIconGenerated = isIconGenerated;
|
| mIsInitialized = mUri != null;
|
| mWebApkPackageName = webApkPackageName;
|
| + mWebManifestUrl = webManifestUrl;
|
| }
|
|
|
| private WebappInfo() {
|
| @@ -296,6 +302,9 @@ public class WebappInfo {
|
| return mIsIconGenerated;
|
| }
|
|
|
| + public String webManifestUrl() {
|
| + return mWebManifestUrl;
|
| + }
|
| /**
|
| * Sets extras on an Intent that will launch a WebappActivity.
|
| * @param intent Intent that will be used to launch a WebappActivity.
|
| @@ -318,6 +327,9 @@ public class WebappInfo {
|
| if (webApkPackageName() != null) {
|
| intent.putExtra(ShortcutHelper.EXTRA_WEBAPK_PACKAGE_NAME, webApkPackageName());
|
| }
|
| + if (mWebManifestUrl != null) {
|
| + intent.putExtra(ShortcutHelper.EXTRA_WEB_MANIFEST_URL, webManifestUrl());
|
| + }
|
| }
|
|
|
| /**
|
|
|