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

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

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/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 27d1f458df9ca7067688b74f8380bc74783d0593..9caa50eb07218140752acf6179c80fb7f43c4a46 100644
--- a/chrome/browser/android/banners/app_banner_manager_android.cc
+++ b/chrome/browser/android/banners/app_banner_manager_android.cc
@@ -31,10 +31,13 @@ const char kPlayInlineReferrer[] = "playinline=chrome_inline";
namespace banners {
-AppBannerManagerAndroid::AppBannerManagerAndroid(JNIEnv* env,
- jobject obj,
- int icon_size)
- : AppBannerManager(icon_size),
+AppBannerManagerAndroid::AppBannerManagerAndroid(
+ JNIEnv* env,
+ jobject obj,
+ int ideal_splash_image_size_in_dp,
+ int ideal_icon_size_in_dp)
+ : AppBannerManager(ideal_icon_size_in_dp),
+ ideal_splash_image_size_in_dp_(ideal_splash_image_size_in_dp),
weak_java_banner_view_manager_(env, obj) {
}
@@ -92,7 +95,7 @@ bool AppBannerManagerAndroid::HandleNonWebApp(const std::string& platform,
ConvertUTF8ToJavaString(env, referrer));
Java_AppBannerManager_fetchAppDetails(env, jobj.obj(), jurl.obj(),
jpackage.obj(), jreferrer.obj(),
- ideal_icon_size());
+ ideal_icon_size_in_dp());
return true;
}
@@ -141,9 +144,10 @@ std::string AppBannerManagerAndroid::ExtractQueryValueForName(
AppBannerDataFetcher* AppBannerManagerAndroid::CreateAppBannerDataFetcher(
base::WeakPtr<Delegate> weak_delegate,
- const int ideal_icon_size) {
+ const int ideal_icon_size_in_dp) {
return new AppBannerDataFetcherAndroid(web_contents(), weak_delegate,
- ideal_icon_size);
+ ideal_splash_image_size_in_dp_,
+ ideal_icon_size_in_dp);
}
bool AppBannerManagerAndroid::OnAppDetailsRetrieved(JNIEnv* env,
@@ -176,9 +180,13 @@ bool AppBannerManagerAndroid::Register(JNIEnv* env) {
return RegisterNativesImpl(env);
}
-jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj, jint icon_size) {
+jlong Init(JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ jint ideal_splash_image_size_in_dp,
+ jint ideal_icon_size_in_dp) {
AppBannerManagerAndroid* manager =
- new AppBannerManagerAndroid(env, obj, icon_size);
+ new AppBannerManagerAndroid(env, obj,
+ ideal_splash_image_size_in_dp, ideal_icon_size_in_dp);
return reinterpret_cast<intptr_t>(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