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

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

Issue 2232783002: Support action button to fetch more content suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippetsbridge
Patch Set: Indent comments Created 4 years, 4 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/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 27f07b3bbdb580a66ebc32643ed811ffee538306..729e6f08c8042495aecf75de14608ad5aa0dbb47 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
@@ -100,6 +100,7 @@ public class SnippetsBridge implements SuggestionsSource {
@Override
public void fetchSuggestionImage(SnippetArticleListItem suggestion, Callback<Bitmap> callback) {
+ assert mNativeSnippetsBridge != 0;
nativeFetchSuggestionImage(mNativeSnippetsBridge, suggestion.mId, callback);
}
@@ -149,8 +150,8 @@ public class SnippetsBridge implements SuggestionsSource {
@CalledByNative
private static SuggestionsCategoryInfo createSuggestionsCategoryInfo(
- String title, int cardLayout) {
- return new SuggestionsCategoryInfo(title, cardLayout);
+ String title, int cardLayout, boolean hasMoreButton) {
+ return new SuggestionsCategoryInfo(title, cardLayout, hasMoreButton);
}
@CalledByNative
@@ -179,7 +180,7 @@ public class SnippetsBridge implements SuggestionsSource {
private native void nativeFetchSuggestionImage(
long nativeNTPSnippetsBridge, String suggestionId, Callback<Bitmap> callback);
private native void nativeDismissSuggestion(long nativeNTPSnippetsBridge, String suggestionId);
- private static native void nativeGetURLVisited(
+ private native void nativeGetURLVisited(
long nativeNTPSnippetsBridge, Callback<Boolean> callback, String url);
private native void nativeSetObserver(long nativeNTPSnippetsBridge, SnippetsBridge bridge);
}

Powered by Google App Engine
This is Rietveld 408576698