Chromium Code Reviews| Index: chrome/browser/android/ntp/ntp_snippets_bridge.cc |
| diff --git a/chrome/browser/android/ntp/ntp_snippets_bridge.cc b/chrome/browser/android/ntp/ntp_snippets_bridge.cc |
| index 8780ce17bf3e28519f63be87d16d7e4db5ad1583..aff844a9fedcdff607bc4ae2c026c36bc5beb716 100644 |
| --- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc |
| +++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc |
| @@ -231,6 +231,23 @@ void NTPSnippetsBridge::FetchSuggestionImage( |
| weak_ptr_factory_.GetWeakPtr(), callback)); |
| } |
| +void NTPSnippetsBridge::FetchSuggestionFavicon( |
| + JNIEnv* env, |
| + const JavaParamRef<jobject>& obj, |
| + jint j_category_id, |
| + const JavaParamRef<jstring>& id_within_category, |
| + jint j_minimum_size_in_pixel, |
| + jint j_desired_size_in_pixel, |
| + const JavaParamRef<jobject>& j_callback) { |
| + base::android::ScopedJavaGlobalRef<jobject> callback(j_callback); |
|
Michael van Ouwerkerk
2017/03/28 11:23:56
There's a using statement for ScopedJavaGlobalRef,
jkrcal
2017/03/28 13:12:53
Done (for much more).
|
| + content_suggestions_service_->FetchSuggestionFavicon( |
| + ContentSuggestion::ID(Category::FromIDValue(j_category_id), |
| + ConvertJavaStringToUTF8(env, id_within_category)), |
| + j_minimum_size_in_pixel, j_desired_size_in_pixel, |
| + base::Bind(&NTPSnippetsBridge::OnImageFetched, |
| + weak_ptr_factory_.GetWeakPtr(), callback)); |
| +} |
| + |
| void NTPSnippetsBridge::Fetch( |
| JNIEnv* env, |
| const JavaParamRef<jobject>& obj, |