| Index: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
|
| diff --git a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
|
| index 31e4fcf5d54daf7becbefcd11a024dbc1bb4a892..4c023cf722a3c4f0eaa06016b52203aa76927a99 100644
|
| --- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
|
| +++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
|
| @@ -49,17 +49,14 @@ GURL GetShortcutUrl(content::BrowserContext* browser_context,
|
|
|
| InstallableParams ParamsToPerformInstallableCheck(
|
| int ideal_icon_size_in_px,
|
| - int minimum_icon_size_in_px,
|
| int badge_size_in_px,
|
| bool check_webapk_compatibility) {
|
| InstallableParams params;
|
| params.ideal_primary_icon_size_in_px = ideal_icon_size_in_px;
|
| - params.minimum_primary_icon_size_in_px = minimum_icon_size_in_px;
|
| params.check_installable = check_webapk_compatibility;
|
| params.fetch_valid_primary_icon = true;
|
| if (check_webapk_compatibility) {
|
| params.ideal_badge_icon_size_in_px = badge_size_in_px;
|
| - params.minimum_badge_icon_size_in_px = badge_size_in_px;
|
| params.fetch_valid_badge_icon = true;
|
| }
|
| return params;
|
| @@ -70,9 +67,7 @@ InstallableParams ParamsToPerformInstallableCheck(
|
| AddToHomescreenDataFetcher::AddToHomescreenDataFetcher(
|
| content::WebContents* web_contents,
|
| int ideal_icon_size_in_px,
|
| - 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_compatibility,
|
| Observer* observer)
|
| @@ -85,18 +80,13 @@ AddToHomescreenDataFetcher::AddToHomescreenDataFetcher(
|
| shortcut_info_(GetShortcutUrl(web_contents->GetBrowserContext(),
|
| web_contents->GetLastCommittedURL())),
|
| ideal_icon_size_in_px_(ideal_icon_size_in_px),
|
| - minimum_icon_size_in_px_(minimum_icon_size_in_px),
|
| ideal_splash_image_size_in_px_(ideal_splash_image_size_in_px),
|
| - minimum_splash_image_size_in_px_(minimum_splash_image_size_in_px),
|
| badge_size_in_px_(badge_size_in_px),
|
| check_webapk_compatibility_(check_webapk_compatibility),
|
| is_waiting_for_web_application_info_(true),
|
| is_installable_check_complete_(false),
|
| is_icon_saved_(false),
|
| is_ready_(false) {
|
| - DCHECK(minimum_icon_size_in_px <= ideal_icon_size_in_px);
|
| - DCHECK(minimum_splash_image_size_in_px <= ideal_splash_image_size_in_px);
|
| -
|
| // Send a message to the renderer to retrieve information about the page.
|
| Send(new ChromeViewMsg_GetWebApplicationInfo(routing_id()));
|
| }
|
| @@ -155,7 +145,6 @@ void AddToHomescreenDataFetcher::OnDidGetWebApplicationInfo(
|
|
|
| manager->GetData(
|
| ParamsToPerformInstallableCheck(ideal_icon_size_in_px_,
|
| - minimum_icon_size_in_px_,
|
| badge_size_in_px_,
|
| check_webapk_compatibility_),
|
| base::Bind(&AddToHomescreenDataFetcher::OnDidPerformInstallableCheck,
|
| @@ -238,11 +227,9 @@ void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck(
|
| // Save the splash screen URL for the later download.
|
| shortcut_info_.splash_image_url = ManifestIconSelector::FindBestMatchingIcon(
|
| data.manifest.icons, ideal_splash_image_size_in_px_,
|
| - minimum_splash_image_size_in_px_,
|
| + InstallableManager::GetMinimumIconSizeInPx(),
|
| content::Manifest::Icon::IconPurpose::ANY);
|
| shortcut_info_.ideal_splash_image_size_in_px = ideal_splash_image_size_in_px_;
|
| - shortcut_info_.minimum_splash_image_size_in_px =
|
| - minimum_splash_image_size_in_px_;
|
|
|
| weak_observer_->OnUserTitleAvailable(shortcut_info_.user_title);
|
|
|
|
|