Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Unified Diff: chrome/browser/android/banners/app_banner_infobar_delegate_android.h

Issue 2259553002: Make AppBannerInfoBar install WebAPK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..c78aa8def8af41f30db46695348dfc8db65437ab 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(
@@ -68,8 +69,12 @@ class AppBannerInfoBarDelegateAndroid : public ConfirmInfoBarDelegate {
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 OnWebApkInstallFinished(bool success, const std::string& webapk_package);
// ConfirmInfoBarDelegate:
infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
@@ -99,6 +104,11 @@ class AppBannerInfoBarDelegateAndroid : public ConfirmInfoBarDelegate {
int event_request_id_;
bool has_user_interaction_;
+ std::string webapk_package_name_;
+ bool is_webapk_;
+
+ base::WeakPtrFactory<AppBannerInfoBarDelegateAndroid> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid);
}; // AppBannerInfoBarDelegateAndroid

Powered by Google App Engine
This is Rietveld 408576698