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..5193a69c97cc36470bb4f48ef95acacd1600eecf 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,19 @@ |
* @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 added to the group. */ |
+ void notifyItemInserted(ItemGroup group, int itemPosition); |
+ |
+ /** Notification about an item having been removed from the group. */ |
+ void notifyItemRemoved(ItemGroup group, int itemPosition); |
+ } |
} |