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

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 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 d3a2ce59808af17993d66faa94b3ebc370f005f9..3c023f682dfb2e2fb0396178cfcb90fdf6c3c3a2 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
@@ -113,10 +113,7 @@ void AddToHomescreenDataFetcher::OnDidGetManifest(
}
GURL icon_src = ManifestIconSelector::FindBestMatchingIcon(
- manifest.icons,
- ideal_icon_size_in_dp_,
- minimum_icon_size_in_dp_,
- gfx::Screen::GetScreenFor(web_contents()->GetNativeView()));
+ manifest.icons, ideal_icon_size_in_dp_, minimum_icon_size_in_dp_);
// If fetching the Manifest icon fails, fallback to the best favicon
// for the page.
@@ -132,10 +129,8 @@ void AddToHomescreenDataFetcher::OnDidGetManifest(
// Save the splash screen URL for the later download.
splash_screen_url_ = ManifestIconSelector::FindBestMatchingIcon(
- manifest.icons,
- ideal_splash_image_size_in_dp_,
- minimum_splash_image_size_in_dp_,
- gfx::Screen::GetScreenFor(web_contents()->GetNativeView()));
+ manifest.icons, ideal_splash_image_size_in_dp_,
+ minimum_splash_image_size_in_dp_);
weak_observer_->OnUserTitleAvailable(shortcut_info_.user_title);
@@ -197,9 +192,9 @@ void AddToHomescreenDataFetcher::FetchFavicon() {
// Using favicon if its size is not smaller than platform required size,
// otherwise using the largest icon among all avaliable icons.
- int ideal_icon_size_in_px = ideal_icon_size_in_dp_ *
- gfx::Screen::GetScreenFor(web_contents()->GetNativeView())->
- GetPrimaryDisplay().device_scale_factor();
+ int ideal_icon_size_in_px =
+ ideal_icon_size_in_dp_ *
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor();
int threshold_to_get_any_largest_icon = ideal_icon_size_in_px - 1;
favicon_service->GetLargestRawFaviconForPageURL(
shortcut_info_.url,
« no previous file with comments | « chrome/browser/android/banners/app_banner_data_fetcher_android.cc ('k') | chrome/browser/banners/app_banner_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698