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

Side by Side Diff: chrome/browser/android/banners/app_banner_manager_android.cc

Issue 2662103002: Refactor ManifestIconSelector and update it for Manifest.icon.purpose (Closed)
Patch Set: Addressing comments Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698