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

Unified Diff: chrome/browser/android/banners/app_banner_manager_android.cc

Issue 2724723002: [WebAPKs]: Reduce the parameters of ShortcutHelper::AddToLauncherWithSkBitmap() (Closed)
Patch Set: Merge branch 'master' into refactor_shortcut_helper2 Created 3 years, 10 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/banners/app_banner_manager_android.cc
diff --git a/chrome/browser/android/banners/app_banner_manager_android.cc b/chrome/browser/android/banners/app_banner_manager_android.cc
index 866e58341fa5b867e5f6e3c81061e704eed5d48d..a6d0f74cde0760acc9a47f841344ba24f87639af 100644
--- a/chrome/browser/android/banners/app_banner_manager_android.cc
+++ b/chrome/browser/android/banners/app_banner_manager_android.cc
@@ -47,6 +47,16 @@ std::unique_ptr<ShortcutInfo> CreateShortcutInfo(
shortcut_info->best_primary_icon_url = icon_url;
shortcut_info->UpdateSource(ShortcutInfo::SOURCE_APP_BANNER);
}
+
+ shortcut_info->ideal_splash_image_size_in_px =
+ ShortcutHelper::GetIdealSplashImageSizeInPx();
+ shortcut_info->minimum_splash_image_size_in_px =
+ ShortcutHelper::GetMinimumSplashImageSizeInPx();
+ shortcut_info->splash_image_url = ManifestIconSelector::FindBestMatchingIcon(
+ manifest.icons, shortcut_info->ideal_splash_image_size_in_px,
+ shortcut_info->minimum_splash_image_size_in_px,
+ content::Manifest::Icon::IconPurpose::ANY);
+
return shortcut_info;
}
@@ -67,25 +77,6 @@ AppBannerManagerAndroid::~AppBannerManagerAndroid() {
java_banner_manager_.Reset();
}
-base::Closure AppBannerManagerAndroid::FetchWebappSplashScreenImageCallback(
- const std::string& webapp_id) {
- content::WebContents* contents = web_contents();
- DCHECK(contents);
-
- int ideal_splash_image_size_in_px =
- ShortcutHelper::GetIdealSplashImageSizeInPx();
- int minimum_splash_image_size_in_px =
- ShortcutHelper::GetMinimumSplashImageSizeInPx();
- GURL image_url = ManifestIconSelector::FindBestMatchingIcon(
- manifest_.icons, ideal_splash_image_size_in_px,
- minimum_splash_image_size_in_px,
- content::Manifest::Icon::IconPurpose::ANY);
-
- return base::Bind(&ShortcutHelper::FetchSplashScreenImage, contents,
- image_url, ideal_splash_image_size_in_px,
- minimum_splash_image_size_in_px, webapp_id);
-}
-
const base::android::ScopedJavaGlobalRef<jobject>&
AppBannerManagerAndroid::GetJavaBannerManager() const {
return java_banner_manager_;
« no previous file with comments | « chrome/browser/android/banners/app_banner_manager_android.h ('k') | chrome/browser/android/shortcut_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698