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

Unified Diff: chrome/browser/android/shortcut_helper.cc

Issue 2611623003: Use exact pixel sizes instead of dip in webapp/WebAPK installability code (Closed)
Patch Set: Rebased version of pkotwicz@'s original patch Created 3 years, 12 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/shortcut_helper.cc
diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc
index 80562638017c0ac80712e8cb8134f47f707b9076..ac08fd224999966c38ccc9c48ca331784ec9cb3f 100644
--- a/chrome/browser/android/shortcut_helper.cc
+++ b/chrome/browser/android/shortcut_helper.cc
@@ -146,25 +146,25 @@ void ShortcutHelper::AddShortcutWithSkBitmap(
info.source);
}
-int ShortcutHelper::GetIdealHomescreenIconSizeInDp() {
+int ShortcutHelper::GetIdealHomescreenIconSizeInPx() {
if (kIdealHomescreenIconSize == -1)
GetHomescreenIconAndSplashImageSizes();
return kIdealHomescreenIconSize;
}
-int ShortcutHelper::GetMinimumHomescreenIconSizeInDp() {
+int ShortcutHelper::GetMinimumHomescreenIconSizeInPx() {
if (kMinimumHomescreenIconSize == -1)
GetHomescreenIconAndSplashImageSizes();
return kMinimumHomescreenIconSize;
}
-int ShortcutHelper::GetIdealSplashImageSizeInDp() {
+int ShortcutHelper::GetIdealSplashImageSizeInPx() {
if (kIdealSplashImageSize == -1)
GetHomescreenIconAndSplashImageSizes();
return kIdealSplashImageSize;
}
-int ShortcutHelper::GetMinimumSplashImageSizeInDp() {
+int ShortcutHelper::GetMinimumSplashImageSizeInPx() {
if (kMinimumSplashImageSize == -1)
GetHomescreenIconAndSplashImageSizes();
return kMinimumSplashImageSize;
@@ -174,14 +174,14 @@ int ShortcutHelper::GetMinimumSplashImageSizeInDp() {
void ShortcutHelper::FetchSplashScreenImage(
content::WebContents* web_contents,
const GURL& image_url,
- const int ideal_splash_image_size_in_dp,
- const int minimum_splash_image_size_in_dp,
+ const int ideal_splash_image_size_in_px,
+ const int minimum_splash_image_size_in_px,
const std::string& webapp_id) {
// This is a fire and forget task. It is not vital for the splash screen image
// to be downloaded so if the downloader returns false there is no fallback.
ManifestIconDownloader::Download(
- web_contents, image_url, ideal_splash_image_size_in_dp,
- minimum_splash_image_size_in_dp,
+ web_contents, image_url, ideal_splash_image_size_in_px,
+ minimum_splash_image_size_in_px,
base::Bind(&ShortcutHelper::StoreWebappSplashImage, webapp_id));
}
« no previous file with comments | « chrome/browser/android/shortcut_helper.h ('k') | chrome/browser/android/webapk/webapk_update_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698