Index: chrome/browser/android/banners/app_banner_infobar_delegate_android.h |
diff --git a/chrome/browser/android/banners/app_banner_infobar_delegate_android.h b/chrome/browser/android/banners/app_banner_infobar_delegate_android.h |
index f678fb52c71d49d46ffd3a5d68d22d57a45bafaf..6626ed6520088039f5029f3c1517ecf3ff3c9b79 100644 |
--- a/chrome/browser/android/banners/app_banner_infobar_delegate_android.h |
+++ b/chrome/browser/android/banners/app_banner_infobar_delegate_android.h |
@@ -38,7 +38,8 @@ class AppBannerInfoBarDelegateAndroid : public ConfirmInfoBarDelegate { |
const content::Manifest& manifest, |
const GURL& icon_url, |
std::unique_ptr<SkBitmap> icon, |
- int event_request_id); |
+ int event_request_id, |
+ bool is_webapk); |
// Delegate for promoting an Android app. |
AppBannerInfoBarDelegateAndroid( |
@@ -66,10 +67,21 @@ class AppBannerInfoBarDelegateAndroid : public ConfirmInfoBarDelegate { |
const base::android::JavaParamRef<jobject>& obj, |
jboolean success); |
+ // Check the status of the associated app banner infobar, and close it if |
+ // the infobar is for a WebAPK, and the WebAPK wasn't installed. |
+ bool CloseAppBannerInfobarIfNeeded( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj); |
+ |
private: |
void CreateJavaDelegate(); |
+ bool AcceptNativeApp(content::WebContents* web_contents); |
+ bool AcceptWebApp(content::WebContents* web_contents); |
+ bool AcceptWebApk(content::WebContents* web_contents); |
void SendBannerAccepted(content::WebContents* web_contents, |
const std::string& platform); |
+ void OnWebApkPackageNameAvailable(const std::string& webapk_package); |
+ void RemoveInfoBarOnUIThread(); |
// ConfirmInfoBarDelegate: |
infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
@@ -99,6 +111,9 @@ class AppBannerInfoBarDelegateAndroid : public ConfirmInfoBarDelegate { |
int event_request_id_; |
bool has_user_interaction_; |
+ std::string webapk_package_name_; |
+ bool is_webapk_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); |
}; // AppBannerInfoBarDelegateAndroid |