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

Side by Side Diff: chrome/browser/ui/webui/snippets_internals_message_handler.h

Issue 2223073002: Add per-section clearing and dismissed suggestions to snippets-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix non-Debug builds Created 4 years, 4 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
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 21 matching lines...) Expand all
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() 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);
43 void HandleClearDismissed(const base::ListValue* args);
44 void HandleDownload(const base::ListValue* args); 42 void HandleDownload(const base::ListValue* args);
45 void HandleClearCachedSuggestions(const base::ListValue* args); 43 void HandleClearCachedSuggestions(const base::ListValue* args);
46 void HandleClearDismissedSuggestions(const base::ListValue* args); 44 void HandleClearDismissedSuggestions(const base::ListValue* args);
47 45
48 void SendAllContent(); 46 void SendAllContent();
49 void SendSnippets();
50 void SendDismissedSnippets();
51 void SendHosts(); 47 void SendHosts();
52 void SendContentSuggestions(); 48 void SendContentSuggestions();
53 void SendBoolean(const std::string& name, bool value); 49 void SendBoolean(const std::string& name, bool value);
54 void SendString(const std::string& name, const std::string& value); 50 void SendString(const std::string& name, const std::string& value);
55 51
56 ScopedObserver<ntp_snippets::ContentSuggestionsService, 52 ScopedObserver<ntp_snippets::ContentSuggestionsService,
57 ntp_snippets::ContentSuggestionsService::Observer> 53 ntp_snippets::ContentSuggestionsService::Observer>
58 content_suggestions_service_observer_; 54 content_suggestions_service_observer_;
59 55
60 // Tracks whether we can already send messages to the page. 56 // Tracks whether we can already send messages to the page.
61 bool dom_loaded_; 57 bool dom_loaded_;
62 58
63 ntp_snippets::NTPSnippetsService* ntp_snippets_service_; 59 ntp_snippets::NTPSnippetsService* ntp_snippets_service_;
64 ntp_snippets::ContentSuggestionsService* content_suggestions_service_; 60 ntp_snippets::ContentSuggestionsService* content_suggestions_service_;
65 61
66 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler); 62 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler);
67 }; 63 };
68 64
69 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ 65 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/snippets_internals.js ('k') | chrome/browser/ui/webui/snippets_internals_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698