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

Unified Diff: components/ntp_snippets/category_info.h

Issue 2232783002: Support action button to fetch more content suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippetsbridge
Patch Set: Indent comments 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: components/ntp_snippets/category_info.h
diff --git a/components/ntp_snippets/category_info.h b/components/ntp_snippets/category_info.h
index 8ae272e9858446480bfc2c0494a48458c0e2baec..0187209fde93f5a2fa2ebb485ce4ad6ec381cc49 100644
--- a/components/ntp_snippets/category_info.h
+++ b/components/ntp_snippets/category_info.h
@@ -24,7 +24,8 @@ enum class ContentSuggestionsCardLayout {
class CategoryInfo {
public:
CategoryInfo(const base::string16& title,
- ContentSuggestionsCardLayout card_layout);
+ ContentSuggestionsCardLayout card_layout,
+ bool has_more_button);
CategoryInfo(CategoryInfo&&) = default;
CategoryInfo& operator=(CategoryInfo&&) = default;
@@ -36,9 +37,15 @@ class CategoryInfo {
// Layout of the cards to be used to display suggestions in this category.
ContentSuggestionsCardLayout card_layout() const { return card_layout_; }
+ // 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.
+ bool has_more_button() const { return has_more_button_; }
+
private:
base::string16 title_;
ContentSuggestionsCardLayout card_layout_;
+ bool has_more_button_;
DISALLOW_COPY_AND_ASSIGN(CategoryInfo);
};

Powered by Google App Engine
This is Rietveld 408576698