Chromium Code Reviews| 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 2c60f386d6554f018216a16c57b556b7b26c68b6..3323dc43b147c933828e5d0ce87f624ad8dcf0f2 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 |
| @@ -29,6 +29,7 @@ public class WebappInfo { |
| private int mSource; |
| private long mThemeColor; |
| private long mBackgroundColor; |
| + private boolean mGeneratedIcon; |
| public static WebappInfo createEmpty() { |
| return new WebappInfo(); |
| @@ -70,12 +71,14 @@ public class WebappInfo { |
| long backgroundColor = IntentUtils.safeGetLongExtra(intent, |
| ShortcutHelper.EXTRA_BACKGROUND_COLOR, |
| ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING); |
| + boolean generatedIcon = IntentUtils.safeGetBooleanExtra(intent, |
|
gone
2015/10/21 23:35:57
same naming comment as above
mlamouri (slow - plz ping)
2015/10/22 14:37:06
Done.
|
| + ShortcutHelper.EXTRA_GENERATED_ICON, false); |
| String name = nameFromIntent(intent); |
| String shortName = shortNameFromIntent(intent); |
| return create(id, url, icon, name, shortName, orientation, source, |
| - themeColor, backgroundColor); |
| + themeColor, backgroundColor, generatedIcon); |
| } |
| /** |
| @@ -91,7 +94,7 @@ public class WebappInfo { |
| */ |
| public static WebappInfo create(String id, String url, String icon, String name, |
| String shortName, int orientation, int source, long themeColor, |
| - long backgroundColor) { |
| + long backgroundColor, boolean generatedIcon) { |
| if (id == null || url == null) { |
| Log.e("WebappInfo", "Data passed in was incomplete: " + id + ", " + url); |
| return null; |
| @@ -99,12 +102,12 @@ public class WebappInfo { |
| Uri uri = Uri.parse(url); |
| return new WebappInfo(id, uri, icon, name, shortName, orientation, source, |
| - themeColor, backgroundColor); |
| + themeColor, backgroundColor, generatedIcon); |
| } |
| private WebappInfo(String id, Uri uri, String encodedIcon, String name, |
| String shortName, int orientation, int source, long themeColor, |
| - long backgroundColor) { |
| + long backgroundColor, boolean generatedIcon) { |
| mEncodedIcon = encodedIcon; |
| mId = id; |
| mName = name; |
| @@ -114,6 +117,7 @@ public class WebappInfo { |
| mSource = source; |
| mThemeColor = themeColor; |
| mBackgroundColor = backgroundColor; |
| + mGeneratedIcon = generatedIcon; |
| mIsInitialized = mUri != null; |
| } |
| @@ -136,6 +140,7 @@ public class WebappInfo { |
| mSource = newInfo.mSource; |
| mThemeColor = newInfo.mThemeColor; |
| mBackgroundColor = newInfo.mBackgroundColor; |
| + mGeneratedIcon = newInfo.mGeneratedIcon; |
| } |
| public boolean isInitialized() { |
| @@ -224,6 +229,13 @@ public class WebappInfo { |
| } |
| /** |
| + * Returns whether the icon was generated by Chromium. |
| + */ |
| + public boolean hasGeneratedIcon() { |
|
mlamouri (slow - plz ping)
2015/10/22 14:37:06
I renamed this to isIconGenerated() to match the n
|
| + return mGeneratedIcon; |
| + } |
| + |
| + /** |
| * Sets extras on an Intent that will launch a WebappActivity. |
| * @param intent Intent that will be used to launch a WebappActivity. |
| */ |