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

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.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/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 2dea7aa3a00b0457d742b1b3fc685e6c50b030e1..76564cf3e5bc6540e855abf4c0f5d38badeca315 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
@@ -7,7 +7,6 @@
#include <vector>
#include "base/bind.h"
-#include "base/callback.h"
#include "base/location.h"
#include "base/strings/string16.h"
#include "base/task_runner_util.h"
@@ -100,13 +99,6 @@ AddToHomescreenDataFetcher::AddToHomescreenDataFetcher(
Send(new ChromeViewMsg_GetWebApplicationInfo(routing_id()));
}
-base::Closure AddToHomescreenDataFetcher::FetchSplashScreenImageCallback(
- const std::string& webapp_id) {
- return base::Bind(&ShortcutHelper::FetchSplashScreenImage, web_contents(),
- splash_screen_url_, ideal_splash_image_size_in_px_,
- minimum_splash_image_size_in_px_, webapp_id);
-}
-
void AddToHomescreenDataFetcher::OnDidGetWebApplicationInfo(
const WebApplicationInfo& received_web_app_info) {
is_waiting_for_web_application_info_ = false;
@@ -244,10 +236,13 @@ void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck(
}
// Save the splash screen URL for the later download.
- splash_screen_url_ = ManifestIconSelector::FindBestMatchingIcon(
+ shortcut_info_.splash_image_url = ManifestIconSelector::FindBestMatchingIcon(
data.manifest.icons, ideal_splash_image_size_in_px_,
minimum_splash_image_size_in_px_,
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);

Powered by Google App Engine
This is Rietveld 408576698