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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialogHelper.java

Issue 1310223002: webapps: initial addition of splash screen icon downloading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webapps-database-exp
Patch Set: Fix compile Created 5 years, 3 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/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialogHelper.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialogHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialogHelper.java
index e01ee23bddabd3ee11df5bae9d26d125cbb12c30..5b0309a9981f0f85f633617a5c59c7516f5d9557 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialogHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialogHelper.java
@@ -46,7 +46,10 @@ public class AddToHomescreenDialogHelper {
*/
public void initialize(Observer observer) {
mObserver = observer;
- mNativeAddToHomescreenDialogHelper = nativeInitialize(mTab.getWebContents());
+ mNativeAddToHomescreenDialogHelper = nativeInitialize(
+ mTab.getWebContents(),
+ ShortcutHelper.getIdealSplashImageSizeInDp(mAppContext.getResources()),
+ ShortcutHelper.getIdealIconSizeInDp(mAppContext.getResources()));
}
/**
@@ -97,7 +100,8 @@ public class AddToHomescreenDialogHelper {
ApplicationStatus.getApplicationContext(), icon, url, red, green, blue);
}
- private native long nativeInitialize(WebContents webContents);
+ private native long nativeInitialize(WebContents webContents,
+ int idealSplashImageSizeInDp, int idealIconSizeInDp);
private native void nativeAddShortcut(long nativeAddToHomescreenDialogHelper,
String userRequestedTitle);
private native void nativeDestroy(long nativeAddToHomescreenDialogHelper);

Powered by Google App Engine
This is Rietveld 408576698