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

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

Issue 2400783003: Ntp: show AllDismissedItem when all sections have been dismissed. (Closed)
Patch Set: Address review comments. Created 4 years, 2 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 07494e52b895874d2afec8619c0593688c6da6ca..9e7437db06701ad50e938b9473e898c1d18aaf67 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
@@ -125,6 +125,12 @@ public class SnippetsBridge implements SuggestionsSource {
}
@Override
+ public void restoreDismissedCategories() {
+ assert mNativeSnippetsBridge != 0;
+ nativeRestoreDismissedCategories(mNativeSnippetsBridge);
+ }
+
+ @Override
public void getSuggestionVisited(SnippetArticle suggestion, Callback<Boolean> callback) {
assert mNativeSnippetsBridge != 0;
nativeGetURLVisited(mNativeSnippetsBridge, callback, suggestion.mUrl);
@@ -240,6 +246,7 @@ public class SnippetsBridge implements SuggestionsSource {
private native void nativeDismissSuggestion(long nativeNTPSnippetsBridge, String url,
int globalPosition, int category, int categoryPosition, String idWithinCategory);
private native void nativeDismissCategory(long nativeNTPSnippetsBridge, int category);
+ private native void nativeRestoreDismissedCategories(long nativeNTPSnippetsBridge);
private native void nativeGetURLVisited(
long nativeNTPSnippetsBridge, Callback<Boolean> callback, String url);
private native void nativeOnPageShown(

Powered by Google App Engine
This is Rietveld 408576698