| 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 20de87adca0e94c373a626207b7e892e97e929f8..631b1d0ea96a495bf3fa5fa6269e8903947fcce3 100644
|
| --- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
|
| +++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
|
| @@ -59,10 +59,11 @@ 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& primary_icon,
|
| + const SkBitmap& badge_icon) = 0;
|
|
|
| - protected:
|
| - virtual ~Observer() {}
|
| + protected:
|
| + virtual ~Observer() {}
|
| };
|
|
|
| // Initialize the fetcher by requesting the information about the page from
|
| @@ -73,6 +74,7 @@ class AddToHomescreenDataFetcher
|
| int minimum_icon_size_in_px,
|
| int ideal_splash_image_size_in_px,
|
| int minimum_splash_image_size_in_px,
|
| + int badge_size_in_px,
|
| bool check_webapk_compatible,
|
| Observer* observer);
|
|
|
| @@ -86,8 +88,9 @@ class AddToHomescreenDataFetcher
|
| // Accessors, etc.
|
| void set_weak_observer(Observer* observer) { weak_observer_ = observer; }
|
| bool is_ready() const { return is_ready_; }
|
| + const SkBitmap& badge_icon() const { return badge_icon_; }
|
| + const SkBitmap& primary_icon() const { return primary_icon_; }
|
| ShortcutInfo& shortcut_info() { return shortcut_info_; }
|
| - const SkBitmap& shortcut_icon() const { return shortcut_icon_; }
|
|
|
| private:
|
| friend class base::RefCounted<AddToHomescreenDataFetcher>;
|
| @@ -123,8 +126,9 @@ class AddToHomescreenDataFetcher
|
|
|
| Observer* weak_observer_;
|
|
|
| - // The icon must only be set on the UI thread for thread safety.
|
| - SkBitmap shortcut_icon_;
|
| + // The icons must only be set on the UI thread for thread safety.
|
| + SkBitmap badge_icon_;
|
| + SkBitmap primary_icon_;
|
| ShortcutInfo shortcut_info_;
|
| GURL splash_screen_url_;
|
|
|
| @@ -135,6 +139,7 @@ class AddToHomescreenDataFetcher
|
| const int minimum_icon_size_in_px_;
|
| const int ideal_splash_image_size_in_px_;
|
| const int minimum_splash_image_size_in_px_;
|
| + const int badge_size_in_px_;
|
|
|
| // Indicates whether to check WebAPK compatibility.
|
| bool check_webapk_compatibility_;
|
|
|