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 45c50d86f37c95ab5815c8ee7715a6aa246a901b..179991e89dc477e4ae99fcb1c28e8fc872628e7e 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 |
@@ -255,4 +255,12 @@ public class WebappInfo { |
intent.putExtra(ShortcutHelper.EXTRA_BACKGROUND_COLOR, backgroundColor()); |
intent.putExtra(ShortcutHelper.EXTRA_IS_ICON_GENERATED, isIconGenerated()); |
} |
+ |
+ /** |
+ * Returns true if the WebappInfo was created for an Intent fired from a launcher shortcut (as |
+ * opposed to an intent from a push notification or other internal source). |
+ */ |
+ public boolean isLaunchedFromHomescreen() { |
+ return source() != ShortcutSource.NOTIFICATION; |
+ } |
} |