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

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

Issue 2570913003: [Android NTP] Move dismissing items into the TreeNode interface. (Closed)
Patch Set: comments 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 6816a1a46eec15e2304263945bf255a3d6c14dbb..b1cfafaabc2734b71034aad7dcca1408165ba3dd 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,7 @@
package org.chromium.chrome.browser.ntp.cards;
+import org.chromium.base.Callback;
import org.chromium.chrome.browser.ntp.snippets.SnippetArticle;
/**
@@ -50,6 +51,14 @@ interface TreeNode {
SnippetArticle getSuggestionAt(int position);
/**
+ * Dismiss the item at the given {@code position}.
+ * @param position The position of the item to be dismissed.
+ * @param itemRemovedCallback Should be called with the title of the dismissed item, to announce
+ * it for accessibility purposes.
+ */
+ public void dismissItem(int position, Callback<String> itemRemovedCallback);
+
+ /**
* 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

Powered by Google App Engine
This is Rietveld 408576698