| 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 CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // content::WebUIMessageHandler: | 36 // content::WebUIMessageHandler: |
| 37 void RegisterMessages() override; | 37 void RegisterMessages() override; |
| 38 | 38 |
| 39 // ntp_snippets::ContentSuggestionsService::Observer: | 39 // ntp_snippets::ContentSuggestionsService::Observer: |
| 40 void OnNewSuggestions(ntp_snippets::Category category) override; | 40 void OnNewSuggestions(ntp_snippets::Category category) override; |
| 41 void OnCategoryStatusChanged( | 41 void OnCategoryStatusChanged( |
| 42 ntp_snippets::Category category, | 42 ntp_snippets::Category category, |
| 43 ntp_snippets::CategoryStatus new_status) override; | 43 ntp_snippets::CategoryStatus new_status) override; |
| 44 void OnSuggestionInvalidated( | 44 void OnSuggestionInvalidated( |
| 45 const ntp_snippets::ContentSuggestion::ID& suggestion_id) override; | 45 const ntp_snippets::ContentSuggestion::ID& suggestion_id) override; |
| 46 void OnFullRefreshRequired() override; |
| 46 void ContentSuggestionsServiceShutdown() override; | 47 void ContentSuggestionsServiceShutdown() override; |
| 47 | 48 |
| 48 void HandleRefreshContent(const base::ListValue* args); | 49 void HandleRefreshContent(const base::ListValue* args); |
| 49 void HandleDownload(const base::ListValue* args); | 50 void HandleDownload(const base::ListValue* args); |
| 50 void HandleClearCachedSuggestions(const base::ListValue* args); | 51 void HandleClearCachedSuggestions(const base::ListValue* args); |
| 51 void HandleClearDismissedSuggestions(const base::ListValue* args); | 52 void HandleClearDismissedSuggestions(const base::ListValue* args); |
| 52 void HandleToggleDismissedSuggestions(const base::ListValue* args); | 53 void HandleToggleDismissedSuggestions(const base::ListValue* args); |
| 53 void ClearClassification(const base::ListValue* args); | 54 void ClearClassification(const base::ListValue* args); |
| 54 | 55 |
| 55 void SendAllContent(); | 56 void SendAllContent(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 80 std::vector<ntp_snippets::ContentSuggestion>, | 81 std::vector<ntp_snippets::ContentSuggestion>, |
| 81 ntp_snippets::Category::CompareByID> | 82 ntp_snippets::Category::CompareByID> |
| 82 dismissed_suggestions_; | 83 dismissed_suggestions_; |
| 83 | 84 |
| 84 base::WeakPtrFactory<SnippetsInternalsMessageHandler> weak_ptr_factory_; | 85 base::WeakPtrFactory<SnippetsInternalsMessageHandler> weak_ptr_factory_; |
| 85 | 86 |
| 86 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler); | 87 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler); |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ | 90 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ |
| OLD | NEW |