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 d02b94576e07aa3f981ee13c89db80f71d8d2554..7246b71572197abcbe3d33326838da759abdf4df 100644 |
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h |
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h |
@@ -74,6 +74,16 @@ class AddToHomescreenDataFetcher |
void OnDidGetManifest(const GURL& manifest_url, |
const content::Manifest& manifest); |
+ // Called once it has been determined whether there is a service worker |
+ // controlling the page. Only pages controlled by a service worker are |
+ // WebAPK-capable. |
+ void OnDidCheckServiceWorkerForWebApk(const content::Manifest& manifest, |
+ bool has_service_worker); |
+ |
+ // Called once it has been determined whether a WebAPK should be created for |
+ // the page. |
+ void OnCheckIsWebApk(const content::Manifest& manifest, bool is_webapk); |
+ |
// Accessors, etc. |
void set_weak_observer(Observer* observer) { weak_observer_ = observer; } |
bool is_ready() { return is_ready_; } |
@@ -107,12 +117,19 @@ class AddToHomescreenDataFetcher |
// appropriate for a home screen shortcut. |
GURL GetShortcutUrl(const GURL& original_url); |
+ // Returns whether a WebAPK can be built for |manifest|. |
+ bool IsManifestWebApkCapable(const content::Manifest& manifest) const; |
+ |
Observer* weak_observer_; |
bool is_waiting_for_web_application_info_; |
bool is_icon_saved_; |
bool is_ready_; |
base::Timer icon_timeout_timer_; |
+ |
+ // The web page's current URL. |
+ GURL shortcut_url_; |
+ |
ShortcutInfo shortcut_info_; |
GURL splash_screen_url_; |