| Index: chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
| index eccfd16e4b410642453111e2b3bd04aaf9196db3..d81bf558405f6e68a9719b22714ccb61bb81c257 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
| @@ -45,6 +45,7 @@ import org.chromium.chrome.browser.widget.RoundedIconGenerator;
|
| import org.chromium.content_public.common.ScreenOrientationConstants;
|
| import org.chromium.net.GURLUtils;
|
| import org.chromium.ui.widget.Toast;
|
| +import org.chromium.webapk.lib.client.WebApkValidator;
|
|
|
| import java.io.ByteArrayOutputStream;
|
| import java.util.List;
|
| @@ -432,6 +433,19 @@ public class ShortcutHelper {
|
| }
|
|
|
| /**
|
| + * Returns true if WebAPKs are enabled and there is a WebAPK installed which can handle
|
| + * {@link url}.
|
| + */
|
| + @CalledByNative
|
| + public static boolean isWebApkInstalled(String url) {
|
| + if (!CommandLine.getInstance().hasSwitch(ChromeSwitches.ENABLE_WEBAPK)) {
|
| + return false;
|
| + }
|
| + return WebApkValidator.queryWebApkPackage(ContextUtils.getApplicationContext(), url)
|
| + != null;
|
| + }
|
| +
|
| + /**
|
| * Compresses a bitmap into a PNG and converts into a Base64 encoded string.
|
| * The encoded string can be decoded using {@link decodeBitmapFromString(String)}.
|
| * @param bitmap The Bitmap to compress and encode.
|
|
|