OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTIONS
_PROVIDER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTIONS
_PROVIDER_H_ |
6 #define COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTIONS
_PROVIDER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTIONS
_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 class PhysicalWebPageSuggestionsProvider : public ContentSuggestionsProvider { | 36 class PhysicalWebPageSuggestionsProvider : public ContentSuggestionsProvider { |
37 public: | 37 public: |
38 PhysicalWebPageSuggestionsProvider( | 38 PhysicalWebPageSuggestionsProvider( |
39 ContentSuggestionsProvider::Observer* observer, | 39 ContentSuggestionsProvider::Observer* observer, |
40 CategoryFactory* category_factory); | 40 CategoryFactory* category_factory); |
41 ~PhysicalWebPageSuggestionsProvider() override; | 41 ~PhysicalWebPageSuggestionsProvider() override; |
42 | 42 |
43 void OnDisplayableUrlsChanged(const std::vector<UrlInfo>& urls); | 43 void OnDisplayableUrlsChanged(const std::vector<UrlInfo>& urls); |
44 | 44 |
45 // ContentSuggestionsProvider implementation. | 45 // ContentSuggestionsProvider implementation. |
46 std::vector<Category> GetProvidedCategories() override; | |
47 CategoryStatus GetCategoryStatus(Category category) override; | 46 CategoryStatus GetCategoryStatus(Category category) override; |
48 CategoryInfo GetCategoryInfo(Category category) override; | 47 CategoryInfo GetCategoryInfo(Category category) override; |
49 void DismissSuggestion(const std::string& suggestion_id) override; | 48 void DismissSuggestion(const std::string& suggestion_id) override; |
50 void FetchSuggestionImage(const std::string& suggestion_id, | 49 void FetchSuggestionImage(const std::string& suggestion_id, |
51 const ImageFetchedCallback& callback) override; | 50 const ImageFetchedCallback& callback) override; |
52 void ClearCachedSuggestionsForDebugging(Category category) override; | 51 void ClearCachedSuggestionsForDebugging(Category category) override; |
53 std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging( | 52 std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging( |
54 Category category) override; | 53 Category category) override; |
55 void ClearDismissedSuggestionsForDebugging(Category category) override; | 54 void ClearDismissedSuggestionsForDebugging(Category category) override; |
56 | 55 |
57 private: | 56 private: |
58 void NotifyStatusChanged(CategoryStatus new_status); | 57 void NotifyStatusChanged(CategoryStatus new_status); |
59 | 58 |
60 CategoryStatus category_status_; | 59 CategoryStatus category_status_; |
61 const Category provided_category_; | 60 const Category provided_category_; |
62 | 61 |
63 DISALLOW_COPY_AND_ASSIGN(PhysicalWebPageSuggestionsProvider); | 62 DISALLOW_COPY_AND_ASSIGN(PhysicalWebPageSuggestionsProvider); |
64 }; | 63 }; |
65 | 64 |
66 } // namespace ntp_snippets | 65 } // namespace ntp_snippets |
67 | 66 |
68 #endif // COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTI
ONS_PROVIDER_H_ | 67 #endif // COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTI
ONS_PROVIDER_H_ |
OLD | NEW |