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

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

Issue 2232783002: Support action button to fetch more content suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippetsbridge
Patch Set: Created 4 years, 4 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/SuggestionsCategoryInfo.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsCategoryInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsCategoryInfo.java
index a0127dc3fd4829f408edd1c9702ac1c77d266255..1d37a54b344e49fae5be152c2ed171012a92b2f7 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsCategoryInfo.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsCategoryInfo.java
@@ -22,9 +22,18 @@ public class SuggestionsCategoryInfo {
@ContentSuggestionsCardLayoutEnum
private final int mCardLayout;
- public SuggestionsCategoryInfo(String title, @ContentSuggestionsCardLayoutEnum int cardLayout) {
+ /**
+ * Whether the category supports a "More" button. The button either triggers
+ * a fixed action (like opening a native page) or, if there is no such fixed
+ * action, it queries the provider for more suggestions.
+ */
+ private final boolean mHasMoreButton;
+
+ public SuggestionsCategoryInfo(
+ String title, @ContentSuggestionsCardLayoutEnum int cardLayout, boolean hasMoreButton) {
this.mTitle = title;
this.mCardLayout = cardLayout;
+ this.mHasMoreButton = hasMoreButton;
}
public String getTitle() {
@@ -34,4 +43,8 @@ public class SuggestionsCategoryInfo {
public int getCardLayout() {
return this.mCardLayout;
}
+
+ public boolean hasMoreButton() {
+ return this.mHasMoreButton;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698