Index: components/ntp_snippets/content_suggestions_service.h |
diff --git a/components/ntp_snippets/content_suggestions_service.h b/components/ntp_snippets/content_suggestions_service.h |
index be34e7290c43a0f9f3db422e13111c16b0fee6c6..9ef6ea7d8b7f87efaba655bb5131b8a51c412771 100644 |
--- a/components/ntp_snippets/content_suggestions_service.h |
+++ b/components/ntp_snippets/content_suggestions_service.h |
@@ -34,6 +34,7 @@ class Image; |
namespace ntp_snippets { |
class NTPSnippetsService; |
+class NTPSnippetsFetcher; |
Marc Treib
2016/10/20 16:51:39
Not needed I think?
Marc Treib
2016/10/28 14:49:49
Done.
|
// Retrieves suggestions from a number of ContentSuggestionsProviders and serves |
// them grouped into categories. There can be at most one provider per category. |
@@ -44,6 +45,8 @@ class ContentSuggestionsService : public KeyedService, |
using ImageFetchedCallback = base::Callback<void(const gfx::Image&)>; |
using DismissedSuggestionsCallback = base::Callback<void( |
std::vector<ContentSuggestion> dismissed_suggestions)>; |
+ using FetchedMoreCallback = |
+ base::Callback<void(std::vector<ContentSuggestion> suggestions)>; |
class Observer { |
public: |
@@ -135,6 +138,11 @@ class ContentSuggestionsService : public KeyedService, |
// Returns whether |category| is dismissed. |
bool IsCategoryDismissed(Category category) const; |
+ // Fetches additional contents for the given |category|. If the fetch was |
+ // completed, the given |callback| is called with the updated content. |
+ // This includes new and old data. |
+ void FetchMore(const Category& category, FetchedMoreCallback callback); |
Marc Treib
2016/10/20 16:51:39
const&
Marc Treib
2016/10/28 14:49:49
Done.
|
+ |
// Observer accessors. |
void AddObserver(Observer* observer); |
void RemoveObserver(Observer* observer); |