| Index: components/ntp_snippets/category_info.h
|
| diff --git a/components/ntp_snippets/category_info.h b/components/ntp_snippets/category_info.h
|
| index 1a659ed232da0099d91745ebbbab24c13a25490a..5eeb9631d2528e8c5e7f40c8d8ba43767223c52b 100644
|
| --- a/components/ntp_snippets/category_info.h
|
| +++ b/components/ntp_snippets/category_info.h
|
| @@ -26,7 +26,8 @@ class CategoryInfo {
|
| CategoryInfo(const base::string16& title,
|
| ContentSuggestionsCardLayout card_layout,
|
| bool has_more_button,
|
| - bool show_if_empty);
|
| + bool show_if_empty,
|
| + const base::string16& no_suggestions_message);
|
| CategoryInfo(CategoryInfo&&) = default;
|
| CategoryInfo& operator=(CategoryInfo&&) = default;
|
|
|
| @@ -38,19 +39,29 @@ 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.
|
| + // Whether the category should show a "More" button even if it's not empty
|
| + // (there's always a "More" or "Reload" button if it is empty). 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.
|
| + // TODO(treib): Rename this to "always_show_more_button".
|
| bool has_more_button() const { return has_more_button_; }
|
|
|
| // Whether this category should be shown if it offers no suggestions.
|
| bool show_if_empty() const { return show_if_empty_; }
|
|
|
| + // The message to show if there are no suggestions in this category. Note that
|
| + // this matters even if |show_if_empty()| is false: The message still shows
|
| + // up when the user dismisses all suggestions in the category.
|
| + const base::string16& no_suggestions_message() const {
|
| + return no_suggestions_message_;
|
| + }
|
| +
|
| private:
|
| base::string16 title_;
|
| ContentSuggestionsCardLayout card_layout_;
|
| bool has_more_button_;
|
| bool show_if_empty_;
|
| + base::string16 no_suggestions_message_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(CategoryInfo);
|
| };
|
|
|