OLD | NEW |
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 const content::NotificationSource& source, | 62 const content::NotificationSource& source, |
63 const content::NotificationDetails& details) OVERRIDE; | 63 const content::NotificationDetails& details) OVERRIDE; |
64 | 64 |
65 static void RegisterUserPrefs(PrefService* prefs); | 65 static void RegisterUserPrefs(PrefService* prefs); |
66 | 66 |
67 private: | 67 private: |
68 // Send a request to the HistoryService to get the suggestions pages. | 68 // Send a request to the HistoryService to get the suggestions pages. |
69 void StartQueryForSuggestions(); | 69 void StartQueryForSuggestions(); |
70 | 70 |
71 // Sets pages_value_ from a format produced by TopSites. | 71 // Sets pages_value_ from a format produced by TopSites. |
72 void SetPagesValueFromTopSites(const history::MostVisitedURLList& data); | 72 void SetPagesValueFromTopSites(const history::FilteredURLList& data); |
73 | 73 |
74 // Callback for History. | 74 // Callback for History. |
75 void OnSuggestionsURLsAvailable( | 75 void OnSuggestionsURLsAvailable( |
76 CancelableRequestProvider::Handle handle, | 76 CancelableRequestProvider::Handle handle, |
77 history::MostVisitedURLList data); | 77 const history::FilteredURLList& data); |
78 | 78 |
79 // Puts the passed URL in the blacklist (so it does not show as a thumbnail). | 79 // Puts the passed URL in the blacklist (so it does not show as a thumbnail). |
80 void BlacklistURL(const GURL& url); | 80 void BlacklistURL(const GURL& url); |
81 | 81 |
82 // Returns the key used in url_blacklist_ for the passed |url|. | 82 // Returns the key used in url_blacklist_ for the passed |url|. |
83 std::string GetDictionaryKeyForURL(const std::string& url); | 83 std::string GetDictionaryKeyForURL(const std::string& url); |
84 | 84 |
85 // Sends pages_value_ to the javascript side to and resets page_value_. | 85 // Sends pages_value_ to the javascript side to and resets page_value_. |
86 void SendPagesValue(); | 86 void SendPagesValue(); |
87 | 87 |
(...skipping 15 matching lines...) Expand all Loading... |
103 // Whether the user has viewed the 'suggested' pane. | 103 // Whether the user has viewed the 'suggested' pane. |
104 bool suggestions_viewed_; | 104 bool suggestions_viewed_; |
105 | 105 |
106 // Whether the user has performed a "tracked" action to leave the page or not. | 106 // Whether the user has performed a "tracked" action to leave the page or not. |
107 bool user_action_logged_; | 107 bool user_action_logged_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(SuggestionsHandler); | 109 DISALLOW_COPY_AND_ASSIGN(SuggestionsHandler); |
110 }; | 110 }; |
111 | 111 |
112 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_PAGE_HANDLER_H_ | 112 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_PAGE_HANDLER_H_ |
OLD | NEW |