Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleListItem.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleListItem.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleListItem.java |
| index e10051f11ba881a176867c5acaef6cd958066bd4..69834cee63d904d0256ef62a7f6c685c8b0ed363 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleListItem.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleListItem.java |
| @@ -8,6 +8,7 @@ import android.graphics.Bitmap; |
| import org.chromium.base.metrics.RecordHistogram; |
| import org.chromium.chrome.browser.ntp.NewTabPageUma; |
| import org.chromium.chrome.browser.ntp.cards.NewTabPageListItem; |
| +import org.chromium.chrome.browser.ntp.snippets.ContentSuggestionsCardLayout.ContentSuggestionsCardLayoutEnum; |
| /** |
| * Represents the data for an article card on the NTP. |
| @@ -40,6 +41,10 @@ public class SnippetArticleListItem implements NewTabPageListItem { |
| /** The position of this article in the whole list of snippets. */ |
| public final int mPosition; |
| + /** The layout that should be used to display the snippet. */ |
| + @ContentSuggestionsCardLayoutEnum |
| + public final int mCardLayout; |
| + |
| /** Bitmap of the thumbnail, fetched lazily, when the RecyclerView wants to show the snippet. */ |
| private Bitmap mThumbnailBitmap; |
| @@ -53,7 +58,7 @@ public class SnippetArticleListItem implements NewTabPageListItem { |
| * Creates a SnippetArticleListItem object that will hold the data. |
| */ |
| public SnippetArticleListItem(String id, String title, String publisher, String previewText, |
| - String url, String ampUrl, long timestamp, float score, int position) { |
| + String url, String ampUrl, long timestamp, float score, int position, int cardLayout) { |
|
Michael van Ouwerkerk
2016/08/11 15:25:48
Add @ContentSuggestionsCardLayoutEnum ?
PEConn
2016/08/11 16:30:10
Done.
|
| mId = id; |
| mTitle = title; |
| mPublisher = publisher; |
| @@ -63,6 +68,7 @@ public class SnippetArticleListItem implements NewTabPageListItem { |
| mPublishTimestampMilliseconds = timestamp; |
| mScore = score; |
| mPosition = position; |
| + mCardLayout = cardLayout; |
| } |
| @Override |