Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/GooglePlayWebApkInstallDelegate.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/GooglePlayWebApkInstallDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/GooglePlayWebApkInstallDelegate.java |
| index 5bcfc29be1eda30ca1c86f1e8a9deb4b03adda78..e5a28452cfa321569181ffd4bfadd0e7e68eef56 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/GooglePlayWebApkInstallDelegate.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/GooglePlayWebApkInstallDelegate.java |
| @@ -32,6 +32,40 @@ public interface GooglePlayWebApkInstallDelegate { |
| public static final int INSTALLED = 6; |
|
pkotwicz
2017/02/03 23:05:05
Do you still need these constants here?
|
| /** |
| + * Status code indicating that the installation request has been successfully processed and |
| + * installation has been scheduled. |
| + */ |
| + public static final int STATUS_CODE_SUCCESS = 0; |
| + |
| + /** |
| + * Status code indicating that the installation request has been rejected due to caller |
| + * verification failure. |
| + */ |
| + public static final int STATUS_CODE_CALLER_VERIFICATION_FAILURE = -1; |
| + |
| + /** |
| + * Status code indicating that the installation request has been rejected because the caller is |
| + * not allowed to install a given package. |
| + */ |
| + public static final int STATUS_CODE_POLICY_VIOLATION = -2; |
| + |
| + /** |
| + * Status code indicating that the install api is currently disabled. |
| + */ |
| + public static final int STATUS_CODE_API_DISABLED = -3; |
| + /** |
| + * Status code indicating that the install request has failed. error Bundle field in the |
| + * response bundle will contain failure reason. |
| + */ |
| + public static final int STATUS_CODE_REQUEST_FAILED = -4; |
| + |
| + /** |
| + * Status code indicating that it fails to bind to the Google Play Service. |
| + */ |
| + public static final int STATUS_CODE_FAIL_TO_BIND_TO_SERVICE = -5; |
| + |
| + public static final int STATUS_CODE_OTHERS = -6; |
| + /** |
| * Uses Google Play to install WebAPK asynchronously. |
| * @param packageName The package name of WebAPK to install. |
| * @param version The version of WebAPK to install. |
| @@ -51,4 +85,11 @@ public interface GooglePlayWebApkInstallDelegate { |
| * @param event The result of the install. |
| */ |
| void onGotInstallEvent(String packageName, @InstallerPackageEvent int event); |
| + |
| + /** |
| + * Checks whether Google Play Install API is available. |
| + * @param callback The callback to invoke when the check is done. |
| + * @return True if the Install API is available. |
| + */ |
| + boolean canUseInstallApi(Callback<Boolean> callback); |
| } |