| 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..d4fad1edbf4633e139bc874337f749dd86693176 100644
|
| --- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
|
| +++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
|
| @@ -38,6 +38,8 @@ class AddToHomescreenDataFetcher
|
| public:
|
| class Observer {
|
| public:
|
| + virtual void OnDidHasManifest(bool has_manifest) = 0;
|
| +
|
| // Called when the title of the page is available.
|
| virtual void OnUserTitleAvailable(const base::string16& title) = 0;
|
|
|
| @@ -50,7 +52,8 @@ class AddToHomescreenDataFetcher
|
|
|
| // Called when all the data needed to create a shortcut is available.
|
| virtual void OnDataAvailable(const ShortcutInfo& info,
|
| - const SkBitmap& icon) = 0;
|
| + const SkBitmap& icon,
|
| + const std::vector<std::string>& icon_urls) = 0;
|
| };
|
|
|
| // Initialize the fetcher by requesting the information about the page to the
|
| @@ -61,8 +64,12 @@ class AddToHomescreenDataFetcher
|
| int minimum_icon_size_in_dp,
|
| int ideal_splash_image_size_in_dp,
|
| int minimum_splash_image_size_in_dp,
|
| + bool stop_fetch_when_no_manifest,
|
| Observer* observer);
|
|
|
| + // Replaces the WebContents that is being observed.
|
| + void ReplaceWebContents(content::WebContents* web_contents);
|
| +
|
| // Returns a callback which fetches the splash screen image to be stored for
|
| // the webapp with the specified |id|.
|
| base::Closure FetchSplashScreenImageCallback(const std::string& id);
|
| @@ -70,6 +77,8 @@ class AddToHomescreenDataFetcher
|
| // IPC message received when the initialization is finished.
|
| void OnDidGetWebApplicationInfo(const WebApplicationInfo& web_app_info);
|
|
|
| + void OnDidHasManifest(bool has_manifest);
|
| +
|
| // Called when the Manifest has been parsed, or if no Manifest was found.
|
| void OnDidGetManifest(const GURL& manifest_url,
|
| const content::Manifest& manifest);
|
| @@ -116,6 +125,7 @@ class AddToHomescreenDataFetcher
|
| ShortcutInfo shortcut_info_;
|
| GURL splash_screen_url_;
|
|
|
| + std::vector<std::string> icon_urls_;
|
| // The icon must only be set on the UI thread for thread safety.
|
| SkBitmap shortcut_icon_;
|
| base::CancelableTaskTracker favicon_task_tracker_;
|
| @@ -125,6 +135,8 @@ class AddToHomescreenDataFetcher
|
| const int ideal_splash_image_size_in_dp_;
|
| const int minimum_splash_image_size_in_dp_;
|
|
|
| + const bool stop_fetch_when_no_manifest_;
|
| +
|
| friend class base::RefCounted<AddToHomescreenDataFetcher>;
|
| DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher);
|
| };
|
|
|