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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemGroup.java

Issue 2360813004: 📰 Stop refreshing the whole NTP for every adapter change (Closed)
Patch Set: Created 4 years, 3 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/cards/ItemGroup.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemGroup.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemGroup.java
index db393a71b77ad41be1e84945430e470d113c5489..8219ccdaa01a38628bdbdd307192d4a5170a5bf9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemGroup.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemGroup.java
@@ -14,4 +14,16 @@
* @return A list of items contained in this group. The list should not be modified.
*/
List<NewTabPageItem> getItems();
+
+ /**
+ * Defines the actions an object can be notified about when there are changes inside of
+ * an {@link ItemGroup}.
+ */
+ interface Observer {
+ /** Non specific notification about changes inside of the group. */
+ void notifyGroupChanged(ItemGroup group, int itemCountBefore, int itemCountAfter);
+
+ /** Notification about an item having been removed from the group. */
+ void notifyItemRemoved(ItemGroup group, int itemPosition);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698