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

Side by Side Diff: chrome/browser/ui/webui/ntp/suggestions_page_handler.h

Issue 9958116: Adds the NewTabPage.SuggestedSitesAction stat. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Removed static variable that required an exit-time destructor. Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_NTP_SUGGESTIONS_PAGE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_PAGE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_PAGE_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_PAGE_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Callback for the "blacklistURLFromSuggestions" message. 46 // Callback for the "blacklistURLFromSuggestions" message.
47 void HandleBlacklistURL(const base::ListValue* args); 47 void HandleBlacklistURL(const base::ListValue* args);
48 48
49 // Callback for the "removeURLsFromSuggestionsBlacklist" message. 49 // Callback for the "removeURLsFromSuggestionsBlacklist" message.
50 void HandleRemoveURLsFromBlacklist(const base::ListValue* args); 50 void HandleRemoveURLsFromBlacklist(const base::ListValue* args);
51 51
52 // Callback for the "clearSuggestionsURLsBlacklist" message. 52 // Callback for the "clearSuggestionsURLsBlacklist" message.
53 void HandleClearBlacklist(const base::ListValue* args); 53 void HandleClearBlacklist(const base::ListValue* args);
54 54
55 // Callback for the "suggestedSitesAction" message.
56 void HandleSuggestedSitesAction(const base::ListValue* args);
57
58 // Callback for the "suggestedSitesSelected" message.
59 void HandleSuggestedSitesSelected(const base::ListValue* args);
60
55 // content::NotificationObserver implementation. 61 // content::NotificationObserver implementation.
56 virtual void Observe(int type, 62 virtual void Observe(int type,
57 const content::NotificationSource& source, 63 const content::NotificationSource& source,
58 const content::NotificationDetails& details) OVERRIDE; 64 const content::NotificationDetails& details) OVERRIDE;
59 65
60 static void RegisterUserPrefs(PrefService* prefs); 66 static void RegisterUserPrefs(PrefService* prefs);
61 67
62 private: 68 private:
63 // Send a request to the HistoryService to get the suggestions pages. 69 // Send a request to the HistoryService to get the suggestions pages.
64 void StartQueryForSuggestions(); 70 void StartQueryForSuggestions();
(...skipping 23 matching lines...) Expand all
88 // Consumer for history service general request(s). 94 // Consumer for history service general request(s).
89 CancelableRequestConsumer history_consumer_; 95 CancelableRequestConsumer history_consumer_;
90 96
91 // We pre-fetch the first set of result pages. This variable is false until 97 // We pre-fetch the first set of result pages. This variable is false until
92 // we get the first getSuggestions() call. 98 // we get the first getSuggestions() call.
93 bool got_first_suggestions_request_; 99 bool got_first_suggestions_request_;
94 100
95 // Keep the results of the db query here. 101 // Keep the results of the db query here.
96 scoped_ptr<base::ListValue> pages_value_; 102 scoped_ptr<base::ListValue> pages_value_;
97 103
104 // Whether the user has viewed the 'suggested' pane.
105 bool suggestions_viewed_;
106
107 // Whether the user has performed a "tracked" action to leave the page or not.
108 bool valid_user_action_;
109
98 DISALLOW_COPY_AND_ASSIGN(SuggestionsHandler); 110 DISALLOW_COPY_AND_ASSIGN(SuggestionsHandler);
99 }; 111 };
100 112
101 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_PAGE_HANDLER_H_ 113 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_PAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698