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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java

Issue 2781583002: [Content suggestions] Add a function to the service API to fetch favicons (Closed)
Patch Set: Fix compilation #2 Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SuggestionsSource.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
index 2ca22132d1119036ea9feb670da24cd416bcb363..0a9c1e67c60dc77ad971f1f24a04feca1e05aa32 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
@@ -126,6 +126,14 @@ public class SnippetsBridge
}
@Override
+ public void fetchSuggestionFavicon(SnippetArticle suggestion, int minimumSizePx,
+ int desiredSizePx, Callback<Bitmap> callback) {
+ assert mNativeSnippetsBridge != 0;
+ nativeFetchSuggestionFavicon(mNativeSnippetsBridge, suggestion.mCategory,
+ suggestion.mIdWithinCategory, minimumSizePx, desiredSizePx, callback);
+ }
+
+ @Override
public void dismissSuggestion(SnippetArticle suggestion) {
assert mNativeSnippetsBridge != 0;
nativeDismissSuggestion(mNativeSnippetsBridge, suggestion.mUrl, suggestion.getGlobalRank(),
@@ -337,6 +345,9 @@ public class SnippetsBridge
long nativeNTPSnippetsBridge, int category);
private native void nativeFetchSuggestionImage(long nativeNTPSnippetsBridge, int category,
String idWithinCategory, Callback<Bitmap> callback);
+ private native void nativeFetchSuggestionFavicon(long nativeNTPSnippetsBridge, int category,
+ String idWithinCategory, int minimumSizePx, int desiredSizePx,
+ Callback<Bitmap> callback);
private native void nativeFetch(
long nativeNTPSnippetsBridge, int category, String[] knownSuggestions);
private native void nativeDismissSuggestion(long nativeNTPSnippetsBridge, String url,
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SuggestionsSource.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698