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

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

Issue 2244793002: Remove deleted offline page suggestions from opened NTPs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust MockContentSuggestionsProvider 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/SuggestionsSource.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SuggestionsSource.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SuggestionsSource.java
index 4d4c3e511879a25980e9ef48de506fb9152608f5..28a98db2364003c70b55d8d40fdf9e95aaf1f402 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SuggestionsSource.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SuggestionsSource.java
@@ -21,10 +21,17 @@ public interface SuggestionsSource {
*/
interface Observer {
/** Called when a category has a new list of content suggestions. */
- void onNewSuggestions(int category);
+ void onNewSuggestions(@CategoryInt int category);
/** Called when a category changed its status. */
- void onCategoryStatusChanged(int category, @CategoryStatusEnum int newStatus);
+ void onCategoryStatusChanged(@CategoryInt int category, @CategoryStatusEnum int newStatus);
+
+ /**
+ * Called when a suggestion is invalidated, which means it needs to be removed from the UI
+ * immediately. This event may be fired for a category or suggestion that does not
+ * currently exist or has never existed and should be ignored in that case.
+ */
+ void onSuggestionInvalidated(@CategoryInt int category, String suggestionId);
}
/**

Powered by Google App Engine
This is Rietveld 408576698