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

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

Issue 2342183002: Call AddToHomescreenDataFetcher::Observer callbacks when manifest fetch times out (Closed)
Patch Set: Merge branch 'master' into remove_unneeded_var 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 8a9ae31d8f112c63df8952de85c03c1fa42c9108..0f0075fb31a96916278826eb8651d2a06752e6b5 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
@@ -73,7 +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,
+ bool check_webapk_compatible,
Observer* observer);
// Returns a callback which fetches the splash screen image to be stored for
@@ -94,9 +94,12 @@ class AddToHomescreenDataFetcher
~AddToHomescreenDataFetcher() override;
- // WebContentsObserver
+ // WebContentsObserver:
bool OnMessageReceived(const IPC::Message& message) override;
+ // Called if either InstallableManager or the favicon fetch takes too long.
+ void OnDataTimedout();
+
// Called when InstallableManager finishes looking for a manifest and icon.
void OnDidPerformInstallableCheck(const InstallableData& data);
@@ -111,8 +114,9 @@ class AddToHomescreenDataFetcher
void CreateLauncherIconFromFaviconInBackground(
const favicon_base::FaviconRawBitmapResult& bitmap_result);
- // Creates the launcher icon from the given |icon|.
- void CreateLauncherIconInBackground(const SkBitmap& raw__icon);
+ // Creates the launcher icon from the given |raw_icon|.
+ void CreateLauncherIcon(const SkBitmap& raw_icon);
+ void CreateLauncherIconInBackground(const SkBitmap& raw_icon);
// Notifies the observer that the shortcut data is all available.
void NotifyObserver(const SkBitmap& icon);
@@ -133,9 +137,9 @@ class AddToHomescreenDataFetcher
const int minimum_splash_image_size_in_dp_;
// Indicates whether to check WebAPK compatibility.
- bool check_installable_;
- bool is_waiting_for_installable_check_;
+ bool check_webapk_compatibility_;
bool is_waiting_for_web_application_info_;
+ bool is_installable_check_complete_;
bool is_icon_saved_;
bool is_ready_;

Powered by Google App Engine
This is Rietveld 408576698