| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/android/banners/app_banner_manager_android.h" | 5 #include "chrome/browser/android/banners/app_banner_manager_android.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 const std::string& webapp_id) { | 70 const std::string& webapp_id) { |
| 71 content::WebContents* contents = web_contents(); | 71 content::WebContents* contents = web_contents(); |
| 72 DCHECK(contents); | 72 DCHECK(contents); |
| 73 | 73 |
| 74 int ideal_splash_image_size_in_px = | 74 int ideal_splash_image_size_in_px = |
| 75 ShortcutHelper::GetIdealSplashImageSizeInPx(); | 75 ShortcutHelper::GetIdealSplashImageSizeInPx(); |
| 76 int minimum_splash_image_size_in_px = | 76 int minimum_splash_image_size_in_px = |
| 77 ShortcutHelper::GetMinimumSplashImageSizeInPx(); | 77 ShortcutHelper::GetMinimumSplashImageSizeInPx(); |
| 78 GURL image_url = ManifestIconSelector::FindBestMatchingIcon( | 78 GURL image_url = ManifestIconSelector::FindBestMatchingIcon( |
| 79 manifest_.icons, ideal_splash_image_size_in_px, | 79 manifest_.icons, ideal_splash_image_size_in_px, |
| 80 minimum_splash_image_size_in_px); | 80 minimum_splash_image_size_in_px, |
| 81 content::Manifest::Icon::IconPurpose::ANY); |
| 81 | 82 |
| 82 return base::Bind(&ShortcutHelper::FetchSplashScreenImage, contents, | 83 return base::Bind(&ShortcutHelper::FetchSplashScreenImage, contents, |
| 83 image_url, ideal_splash_image_size_in_px, | 84 image_url, ideal_splash_image_size_in_px, |
| 84 minimum_splash_image_size_in_px, webapp_id); | 85 minimum_splash_image_size_in_px, webapp_id); |
| 85 } | 86 } |
| 86 | 87 |
| 87 const base::android::ScopedJavaGlobalRef<jobject>& | 88 const base::android::ScopedJavaGlobalRef<jobject>& |
| 88 AppBannerManagerAndroid::GetJavaBannerManager() const { | 89 AppBannerManagerAndroid::GetJavaBannerManager() const { |
| 89 return java_banner_manager_; | 90 return java_banner_manager_; |
| 90 } | 91 } |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 329 } |
| 329 | 330 |
| 330 // static | 331 // static |
| 331 void SetTotalEngagementToTrigger(JNIEnv* env, | 332 void SetTotalEngagementToTrigger(JNIEnv* env, |
| 332 const JavaParamRef<jclass>& clazz, | 333 const JavaParamRef<jclass>& clazz, |
| 333 jdouble engagement) { | 334 jdouble engagement) { |
| 334 AppBannerSettingsHelper::SetTotalEngagementToTrigger(engagement); | 335 AppBannerSettingsHelper::SetTotalEngagementToTrigger(engagement); |
| 335 } | 336 } |
| 336 | 337 |
| 337 } // namespace banners | 338 } // namespace banners |
| OLD | NEW |