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

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

Issue 2513453004: [Android NTP] Move suggestion sections into a separate node. (Closed)
Patch Set: sync Created 4 years 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/TreeNode.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/TreeNode.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/TreeNode.java
index 6c76fcb6c7be149c5e4e62f37022bf1ae8c3c68e..75997a493b5d2cba0d22cfc559b89de60a92aaee 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/TreeNode.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/TreeNode.java
@@ -4,6 +4,8 @@
package org.chromium.chrome.browser.ntp.cards;
+import android.support.annotation.CallSuper;
+
import org.chromium.chrome.browser.ntp.snippets.SnippetArticle;
/**
@@ -11,6 +13,17 @@ import org.chromium.chrome.browser.ntp.snippets.SnippetArticle;
*/
interface TreeNode {
/**
+ * Initialize the node (and any children underneath it). This method should be called after the
+ * node has been added to the tree, i.e. when it is in the list of its parent's children.
+ * The node may notify its parent about changes that happen during initialization.
+ */
+ @CallSuper
+ void init();
+
+ /**
+ * Returns the number of items under this subtree. This method may be called
+ * before initialization.
+ *
* @return The number of items under this subtree.
* @see android.support.v7.widget.RecyclerView.Adapter#getItemCount()
*/

Powered by Google App Engine
This is Rietveld 408576698