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

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

Issue 2675803004: Fall back to shortcut A2HS when Phonesky is out of date or unavailable. (Closed)
Patch Set: Update add_to_homescreen_data_fetcher_unittest.cc. Created 3 years, 10 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_manager_android.h
diff --git a/chrome/browser/android/banners/app_banner_manager_android.h b/chrome/browser/android/banners/app_banner_manager_android.h
index 8fe6f6d6aa14af3931a24566cc436df15ffd1fa0..caed3ac7f0114f912cbefbd8a0290283d7cfe5d8 100644
--- a/chrome/browser/android/banners/app_banner_manager_android.h
+++ b/chrome/browser/android/banners/app_banner_manager_android.h
@@ -10,6 +10,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/callback_forward.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "chrome/browser/banners/app_banner_manager.h"
#include "content/public/browser/web_contents_user_data.h"
@@ -101,6 +102,16 @@ class AppBannerManagerAndroid
const GURL& url,
const std::string& id);
+ // Called by |ShowBanner()| which may check whether the WebAPK Install API is
+ // availabel asynchrously.
+ void ShowBannerImpl(content::WebContents* contents,
+ bool can_use_webapk_install_flow);
+
+ // Called when the check of whether the Google Play Install API is available
+ // is done.
+ void OnCanUseGooglePlayInstallApi(content::WebContents* contents,
+ bool can_use_webapk_install_flow);
+
// The Java-side AppBannerManager.
base::android::ScopedJavaGlobalRef<jobject> java_banner_manager_;
@@ -110,6 +121,8 @@ class AppBannerManagerAndroid
// App package name for a native app banner.
std::string native_app_package_;
+ base::WeakPtrFactory<AppBannerManagerAndroid> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AppBannerManagerAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698