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

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

Issue 2665983005: Ntp: use callbacks for partial binding, they can carry more detail. (Closed)
Patch Set: Address review comments from bauerb. Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/InnerNode.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java
index 585082cae81fa136d22d1f02e963ac3ae35ebb1f..69e98bbf2279e74fd91842ef1309478cf1f287c6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java
@@ -5,6 +5,9 @@
package org.chromium.chrome.browser.ntp.cards;
import android.support.annotation.CallSuper;
+import android.support.annotation.Nullable;
+
+import org.chromium.chrome.browser.ntp.cards.NewTabPageViewHolder.PartialBindCallback;
/**
* A node in the tree that has a parent and can notify it about changes.
@@ -35,8 +38,9 @@ public abstract class ChildNode implements TreeNode {
return mNumItems;
}
- protected void notifyItemRangeChanged(int index, int count, Object payload) {
- if (mParent != null) mParent.onItemRangeChanged(this, index, count, payload);
+ protected void notifyItemRangeChanged(
+ int index, int count, @Nullable PartialBindCallback callback) {
+ if (mParent != null) mParent.onItemRangeChanged(this, index, count, callback);
}
protected void notifyItemRangeChanged(int index, int count) {
@@ -55,8 +59,8 @@ public abstract class ChildNode implements TreeNode {
if (mParent != null) mParent.onItemRangeRemoved(this, index, count);
}
- protected void notifyItemChanged(int index, Object payload) {
- notifyItemRangeChanged(index, 1, payload);
+ protected void notifyItemChanged(int index, @Nullable PartialBindCallback callback) {
+ notifyItemRangeChanged(index, 1, callback);
}
protected void notifyItemChanged(int index) {
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/InnerNode.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698