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

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h

Issue 2292133003: Determine whether to show "Add to Homescreen" dialog or WebAPK infobar (Closed)
Patch Set: Clean up. Created 4 years, 3 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/webapps/add_to_homescreen_data_fetcher.h
diff --git a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
index 47e8d06c82e4e1ee0faf467a6f38319a623ebb04..12475530fd093eac8d1668e158291cfc2c7ee997 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
@@ -43,6 +43,10 @@ class AddToHomescreenDataFetcher
public:
class Observer {
public:
+ // Callded when the installable check is compelte.
+ virtual void OnDidDetermineWebApkCompatibility(
+ bool is_webapk_compatible) = 0;
+
// Called when the title of the page is available.
virtual void OnUserTitleAvailable(const base::string16& title) = 0;
@@ -56,6 +60,9 @@ class AddToHomescreenDataFetcher
// Called when all the data needed to create a shortcut is available.
virtual void OnDataAvailable(const ShortcutInfo& info,
const SkBitmap& icon) = 0;
+
+ protected:
+ virtual ~Observer() {}
};
// Initialize the fetcher by requesting the information about the page from
@@ -66,6 +73,7 @@ class AddToHomescreenDataFetcher
int minimum_icon_size_in_dp,
int ideal_splash_image_size_in_dp,
int minimum_splash_image_size_in_dp,
+ bool check_installable,
Observer* observer);
// Returns a callback which fetches the splash screen image to be stored for
@@ -123,6 +131,10 @@ class AddToHomescreenDataFetcher
const int minimum_icon_size_in_dp_;
const int ideal_splash_image_size_in_dp_;
const int minimum_splash_image_size_in_dp_;
+
+ // Indicates whether to check WebAPK compatibility.
+ bool check_installable_;
+ bool is_waiting_for_installable_check_;
bool is_waiting_for_web_application_info_;
bool is_icon_saved_;
bool is_ready_;
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698