| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
|
| index f3d98d2cdb4a3afdd78773167e77e69cc01f0b9e..4b8632f8d4a465e4932f50b2963f9bc84f94a1bb 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
|
| @@ -21,9 +21,12 @@
|
| private final SnippetHeaderListItem mHeader = new SnippetHeaderListItem();
|
| private StatusListItem mStatus;
|
| private final ProgressListItem mProgressIndicator = new ProgressListItem();
|
| + private final ActionListItem mMoreButton;
|
|
|
| public SuggestionsSection(List<SnippetArticleListItem> suggestions,
|
| - @CategoryStatusEnum int status, NewTabPageAdapter adapter) {
|
| + @CategoryStatusEnum int status, NewTabPageAdapter adapter, boolean showMoreButton) {
|
| + mMoreButton = showMoreButton ? new ActionListItem() : null;
|
| +
|
| // TODO(mvanouwerkerk): Pass in the header text.
|
| setSuggestions(suggestions, status, adapter);
|
| }
|
| @@ -36,6 +39,8 @@ public SuggestionsSection(List<SnippetArticleListItem> suggestions,
|
| if (mSuggestions.isEmpty()) {
|
| items.add(mStatus);
|
| items.add(mProgressIndicator);
|
| + } else if (mMoreButton != null) {
|
| + items.add(mMoreButton);
|
| }
|
| return Collections.unmodifiableList(items);
|
| }
|
|
|