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 HandleClear(const base::ListValue* args); | 42 void HandleClear(const base::ListValue* args); |
43 void HandleClearDismissed(const base::ListValue* args); | 43 void HandleClearDismissed(const base::ListValue* args); |
44 void HandleDownload(const base::ListValue* args); | 44 void HandleDownload(const base::ListValue* args); |
45 void HandleClearCachedSuggestions(const base::ListValue* args); | 45 void HandleClearCachedSuggestions(const base::ListValue* args); |
(...skipping 14 matching lines...) Expand all Loading... |
60 // Tracks whether we can already send messages to the page. | 60 // Tracks whether we can already send messages to the page. |
61 bool dom_loaded_; | 61 bool dom_loaded_; |
62 | 62 |
63 ntp_snippets::NTPSnippetsService* ntp_snippets_service_; | 63 ntp_snippets::NTPSnippetsService* ntp_snippets_service_; |
64 ntp_snippets::ContentSuggestionsService* content_suggestions_service_; | 64 ntp_snippets::ContentSuggestionsService* content_suggestions_service_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler); | 66 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler); |
67 }; | 67 }; |
68 | 68 |
69 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ | 69 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ |
OLD | NEW |