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

Side by Side Diff: components/ntp_snippets/ios/reading_list_suggestions_provider.h

Issue 2755113002: Create ReadingListSuggestionsProvider (Closed)
Patch Set: Address comments Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_NTP_SNIPPETS_IOS_READING_LIST_SUGGESTIONS_PROVIDER_H_
6 #define COMPONENTS_NTP_SNIPPETS_IOS_READING_LIST_SUGGESTIONS_PROVIDER_H_
7
8 #include <set>
9 #include <string>
10
11 #include "components/ntp_snippets/callbacks.h"
12 #include "components/ntp_snippets/category.h"
13 #include "components/ntp_snippets/category_info.h"
14 #include "components/ntp_snippets/category_status.h"
15 #include "components/ntp_snippets/content_suggestion.h"
16 #include "components/ntp_snippets/content_suggestions_provider.h"
17 #include "components/reading_list/ios/reading_list_model_observer.h"
18
19 class ReadingListModel;
20
21 namespace ntp_snippets {
22
23 // Provides content suggestions from the Reading List.
24 class ReadingListSuggestionsProvider : public ContentSuggestionsProvider,
25 public ReadingListModelObserver {
tschumann 2017/03/20 08:58:13 I wonder if we can avoid having the provider be to
gambard 2017/03/23 15:45:52 I planned to have the support of ReadingListModelO
26 public:
27 ReadingListSuggestionsProvider(ContentSuggestionsProvider::Observer* observer,
28 ReadingListModel* reading_list_model);
29 ~ReadingListSuggestionsProvider() override;
30
31 private:
32 // ContentSuggestionsProvider implementation.
tschumann 2017/03/20 08:58:13 there was some discussion about artificially (and
Marc Treib 2017/03/20 09:55:26 It depends - things that aren't conceptually part
tschumann 2017/03/20 09:59:58 The problem is that you cannot effecively hide it
gambard 2017/03/23 15:45:52 I set it public.
33 CategoryStatus GetCategoryStatus(Category category) override;
34 CategoryInfo GetCategoryInfo(Category category) override;
35 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id) override;
36 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id,
37 const ImageFetchedCallback& callback) override;
38 void Fetch(const Category& category,
39 const std::set<std::string>& known_suggestion_ids,
40 const FetchDoneCallback& callback) override;
41 void ClearHistory(
42 base::Time begin,
43 base::Time end,
44 const base::Callback<bool(const GURL& url)>& filter) override;
45 void ClearCachedSuggestions(Category category) override;
46 void GetDismissedSuggestionsForDebugging(
47 Category category,
48 const DismissedSuggestionsCallback& callback) override;
49 void ClearDismissedSuggestionsForDebugging(Category category) override;
50
51 // ReadingListModelObserver implementation.
52 void ReadingListModelLoaded(const ReadingListModel* model) override;
53
54 void FetchReadingListInternal();
55
56 CategoryStatus category_status_;
57 const Category provided_category_;
58
59 ReadingListModel* reading_list_model_;
60
61 DISALLOW_COPY_AND_ASSIGN(ReadingListSuggestionsProvider);
62 };
63
64 } // namespace ntp_snippets
65
66 #endif // COMPONENTS_NTP_SNIPPETS_IOS_READING_LIST_SUGGESTIONS_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/ntp_snippets/ios/DEPS ('k') | components/ntp_snippets/ios/reading_list_suggestions_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698