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

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

Issue 2439763002: [Android NTP] Move getDismissSiblingPosDelta into the TreeNode interface. (Closed)
Patch Set: review Created 4 years, 2 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 | « chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java ('k') | no next file » | 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/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 d05487539a4c70aeeb12166b5b5bdfb2ec5399f7..6c76fcb6c7be149c5e4e62f37022bf1ae8c3c68e 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
@@ -38,4 +38,16 @@ interface TreeNode {
* an article.
*/
SnippetArticle getSuggestionAt(int position);
+
+ /**
+ * The dismiss sibling is an item that should be dismissed at the same time as the provided
+ * one. For example, if we want to dismiss a status card that has a More button attached, the
+ * button is the card's dismiss sibling. This function returns the adapter position delta to
+ * apply to get to the sibling from the provided item. For the previous example, it would return
+ * {@code +1}, as the button comes right after the status card.
+ *
+ * @return a position delta to apply to the position of the provided item to get the adapter
+ * position of the item to animate. Returns {@code 0} if there is no dismiss sibling.
+ */
+ int getDismissSiblingPosDelta(int position);
}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698