Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java |
index 0ffe9f04c3fcc337da71feffc4d81aba76408a24..35778b5eaf9475a02b2d8e95941ce14eac444769 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java |
@@ -26,6 +26,8 @@ public class AppBannerInfoBarAndroid extends ConfirmInfoBar implements View.OnCl |
public static final int INSTALL_STATE_NOT_INSTALLED = 0; |
public static final int INSTALL_STATE_INSTALLING = 1; |
public static final int INSTALL_STATE_INSTALLED = 2; |
+ public static final int INSTALL_STATE_INSTALLING_WEBAPK = 3; |
+ public static final int INSTALL_STATE_INSTALLED_WEBAPK = 4; |
pkotwicz
2016/08/19 22:17:37
Can we pass in whether the infobar is for a WebAPK
|
// Views composing the infobar. |
private Button mButton; |
@@ -136,7 +138,11 @@ public class AppBannerInfoBarAndroid extends ConfirmInfoBar implements View.OnCl |
} |
private void updateButton() { |
- if (mButton == null || mAppData == null) return; |
+ if (mButton == null || mAppData == null |
+ && (mInstallState != INSTALL_STATE_INSTALLING_WEBAPK |
+ && mInstallState != INSTALL_STATE_INSTALLED_WEBAPK)) { |
+ return; |
+ } |
String text; |
String accessibilityText = null; |
@@ -148,6 +154,9 @@ public class AppBannerInfoBarAndroid extends ConfirmInfoBar implements View.OnCl |
} else if (mInstallState == INSTALL_STATE_INSTALLING) { |
text = getContext().getString(R.string.app_banner_installing); |
enabled = false; |
+ } else if (mInstallState == INSTALL_STATE_INSTALLING_WEBAPK) { |
+ text = getContext().getString(R.string.app_banner_installing_webapk); |
+ enabled = false; |
} else { |
text = getContext().getString(R.string.app_banner_open); |
} |