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

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

Issue 2400783003: Ntp: show AllDismissedItem when all sections have been dismissed. (Closed)
Patch Set: 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
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageItem.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageItem.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageItem.java
index 74d38834b1d905d3c2a5893fa73c3a7e57c00cbd..e826c0e1f0cba9cf8406fd715fd4491c54604b15 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageItem.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageItem.java
@@ -18,7 +18,8 @@ public interface NewTabPageItem {
* @see NewTabPageItem#getType()
*/
@IntDef({VIEW_TYPE_ABOVE_THE_FOLD, VIEW_TYPE_HEADER, VIEW_TYPE_SNIPPET, VIEW_TYPE_SPACING,
- VIEW_TYPE_STATUS, VIEW_TYPE_PROGRESS, VIEW_TYPE_ACTION, VIEW_TYPE_PROMO})
+ VIEW_TYPE_STATUS, VIEW_TYPE_PROGRESS, VIEW_TYPE_ACTION, VIEW_TYPE_FOOTER,
+ VIEW_TYPE_PROMO, VIEW_TYPE_ALL_DISMISSED})
@Retention(RetentionPolicy.SOURCE)
public @interface ViewType {}
@@ -77,6 +78,15 @@ public interface NewTabPageItem {
public static final int VIEW_TYPE_PROMO = 9;
/**
+ * View type for a {@link AllDismissedItem}.
+ * @see Adapter#getItemViewType(int)
+ */
+ public static final int VIEW_TYPE_ALL_DISMISSED = 10;
+
+ // NOTE: when adding new entries here, also update the IntDef at the top of this file, and
+ // CardViewHolder#isCard(int type).
+
+ /**
* Returns the type ({@link ViewType}) of this list item. This is so we can
* distinguish between different elements that are held in a single RecyclerView holder.
*

Powered by Google App Engine
This is Rietveld 408576698