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_MOST_VISITED_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 | 83 |
84 // Callback for TopSites. | 84 // Callback for TopSites. |
85 void OnMostVisitedUrlsAvailable(const history::MostVisitedURLList& data); | 85 void OnMostVisitedUrlsAvailable(const history::MostVisitedURLList& data); |
86 | 86 |
87 // Puts the passed URL in the blacklist (so it does not show as a thumbnail). | 87 // Puts the passed URL in the blacklist (so it does not show as a thumbnail). |
88 void BlacklistUrl(const GURL& url); | 88 void BlacklistUrl(const GURL& url); |
89 | 89 |
90 // Returns the key used in url_blacklist_ for the passed |url|. | 90 // Returns the key used in url_blacklist_ for the passed |url|. |
91 std::string GetDictionaryKeyForUrl(const std::string& url); | 91 std::string GetDictionaryKeyForUrl(const std::string& url); |
92 | 92 |
93 // Looks at the browser's currently open URLs and removes any matching URLs | 93 // Experiment that removes recommended URLs if a matching URL is already open |
94 // from |pages_value_|. | 94 // in the Browser. |
beaudoin
2013/06/20 21:55:44
Same here.
annark1
2013/07/04 18:29:15
Done.
| |
95 void RemovePageValuesMatchingOpenTabs(); | 95 void MaybeRemovePageValues(); |
96 | 96 |
97 // Sends pages_value_ to the javascript side and resets page_value_. | 97 // Sends pages_value_ to the javascript side and resets page_value_. |
98 void SendPagesValue(); | 98 void SendPagesValue(); |
99 | 99 |
100 content::NotificationRegistrar registrar_; | 100 content::NotificationRegistrar registrar_; |
101 | 101 |
102 // For callbacks may be run after destruction. | 102 // For callbacks may be run after destruction. |
103 base::WeakPtrFactory<MostVisitedHandler> weak_ptr_factory_; | 103 base::WeakPtrFactory<MostVisitedHandler> weak_ptr_factory_; |
104 | 104 |
105 // The most visited URLs, in priority order. | 105 // The most visited URLs, in priority order. |
(...skipping 11 matching lines...) Expand all Loading... | |
117 // Whether the user has viewed the 'most visited' pane. | 117 // Whether the user has viewed the 'most visited' pane. |
118 bool most_visited_viewed_; | 118 bool most_visited_viewed_; |
119 | 119 |
120 // Whether the user has performed a "tracked" action to leave the page or not. | 120 // Whether the user has performed a "tracked" action to leave the page or not. |
121 bool user_action_logged_; | 121 bool user_action_logged_; |
122 | 122 |
123 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler); | 123 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler); |
124 }; | 124 }; |
125 | 125 |
126 #endif // CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ | 126 #endif // CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ |
OLD | NEW |