Chromium Code Reviews| 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 86f4e675ade388190c0be828c527f7de92842950..47a0fe27a9d316f008df7af7885a3841a996a5eb 100644 |
| --- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h |
| +++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h |
| @@ -50,6 +50,7 @@ class AddToHomescreenDataFetcher |
| // Called when all the data needed to create a shortcut is available. |
| virtual void OnDataAvailable(const ShortcutInfo& info, |
| + const GURL& icon_url, |
| const SkBitmap& icon) = 0; |
| }; |
| @@ -77,6 +78,7 @@ class AddToHomescreenDataFetcher |
| void set_weak_observer(Observer* observer) { weak_observer_ = observer; } |
| bool is_ready() { return is_ready_; } |
| ShortcutInfo& shortcut_info() { return shortcut_info_; } |
| + const GURL& shortcut_icon_url() { return shortcut_icon_url_; } |
| const SkBitmap& shortcut_icon() { return shortcut_icon_; } |
| // WebContentsObserver |
| @@ -96,10 +98,10 @@ class AddToHomescreenDataFetcher |
| // Callback run after an attempt to download manifest icon has been made. May |
| // kick off the download of a favicon if it failed (i.e. the bitmap is empty). |
| - void OnManifestIconFetched(const SkBitmap& icon); |
| + void OnManifestIconFetched(const GURL& icon_url, const SkBitmap& icon); |
| // Notifies the observer that the shortcut data is all available. |
| - void NotifyObserver(const SkBitmap& icon, bool is_generated); |
| + void NotifyObserver(const GURL& icon_url, const SkBitmap& icon); |
| // Looks up the original, online URL of the site requested. The URL from the |
| // WebContents may be an offline page or a distilled article which is not |
| @@ -116,6 +118,7 @@ class AddToHomescreenDataFetcher |
| GURL splash_screen_url_; |
| // The icon must only be set on the UI thread for thread safety. |
| + GURL shortcut_icon_url_; |
|
dominickn
2016/06/16 21:16:36
Instead of this being a member variable on the fet
|
| SkBitmap shortcut_icon_; |
| base::CancelableTaskTracker favicon_task_tracker_; |