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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 public ntp_snippets::ContentSuggestionsService::Observer { | 25 public ntp_snippets::ContentSuggestionsService::Observer { |
26 public: | 26 public: |
27 SnippetsInternalsMessageHandler(); | 27 SnippetsInternalsMessageHandler(); |
28 ~SnippetsInternalsMessageHandler() override; | 28 ~SnippetsInternalsMessageHandler() override; |
29 | 29 |
30 private: | 30 private: |
31 // content::WebUIMessageHandler: | 31 // content::WebUIMessageHandler: |
32 void RegisterMessages() override; | 32 void RegisterMessages() override; |
33 | 33 |
34 // ntp_snippets::ContentSuggestionsService::Observer: | 34 // ntp_snippets::ContentSuggestionsService::Observer: |
35 void OnNewSuggestions() override; | 35 void OnNewSuggestions(ntp_snippets::Category category) override; |
36 void OnCategoryStatusChanged( | 36 void OnCategoryStatusChanged( |
37 ntp_snippets::Category category, | 37 ntp_snippets::Category category, |
38 ntp_snippets::CategoryStatus new_status) override; | 38 ntp_snippets::CategoryStatus new_status) override; |
39 void ContentSuggestionsServiceShutdown() override; | 39 void ContentSuggestionsServiceShutdown() override; |
40 | 40 |
41 void HandleRefreshContent(const base::ListValue* args); | 41 void HandleRefreshContent(const base::ListValue* args); |
42 void HandleDownload(const base::ListValue* args); | 42 void HandleDownload(const base::ListValue* args); |
43 void HandleClearCachedSuggestions(const base::ListValue* args); | 43 void HandleClearCachedSuggestions(const base::ListValue* args); |
44 void HandleClearDismissedSuggestions(const base::ListValue* args); | 44 void HandleClearDismissedSuggestions(const base::ListValue* args); |
45 | 45 |
(...skipping 10 matching lines...) Expand all Loading... |
56 // Tracks whether we can already send messages to the page. | 56 // Tracks whether we can already send messages to the page. |
57 bool dom_loaded_; | 57 bool dom_loaded_; |
58 | 58 |
59 ntp_snippets::NTPSnippetsService* ntp_snippets_service_; | 59 ntp_snippets::NTPSnippetsService* ntp_snippets_service_; |
60 ntp_snippets::ContentSuggestionsService* content_suggestions_service_; | 60 ntp_snippets::ContentSuggestionsService* content_suggestions_service_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler); | 62 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler); |
63 }; | 63 }; |
64 | 64 |
65 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ | 65 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ |
OLD | NEW |