| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/common/cancelable_request.h" | 10 #include "chrome/browser/common/cancelable_request.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 void HandleSuggestedSitesSelected(const base::ListValue* args); | 61 void HandleSuggestedSitesSelected(const base::ListValue* args); |
| 62 | 62 |
| 63 // content::NotificationObserver implementation. | 63 // content::NotificationObserver implementation. |
| 64 virtual void Observe(int type, | 64 virtual void Observe(int type, |
| 65 const content::NotificationSource& source, | 65 const content::NotificationSource& source, |
| 66 const content::NotificationDetails& details) OVERRIDE; | 66 const content::NotificationDetails& details) OVERRIDE; |
| 67 | 67 |
| 68 // SuggestionsCombiner::Delegate implementation. | 68 // SuggestionsCombiner::Delegate implementation. |
| 69 virtual void OnSuggestionsReady() OVERRIDE; | 69 virtual void OnSuggestionsReady() OVERRIDE; |
| 70 | 70 |
| 71 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 71 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 // Puts the passed URL in the blacklist (so it does not show as a thumbnail). | 74 // Puts the passed URL in the blacklist (so it does not show as a thumbnail). |
| 75 void BlacklistURL(const GURL& url); | 75 void BlacklistURL(const GURL& url); |
| 76 | 76 |
| 77 // Returns the key used in url_blacklist_ for the passed |url|. | 77 // Returns the key used in url_blacklist_ for the passed |url|. |
| 78 std::string GetDictionaryKeyForURL(const std::string& url); | 78 std::string GetDictionaryKeyForURL(const std::string& url); |
| 79 | 79 |
| 80 // Sends pages_value_ to the javascript side to and resets page_value_. | 80 // Sends pages_value_ to the javascript side to and resets page_value_. |
| 81 void SendPagesValue(); | 81 void SendPagesValue(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 92 // Whether the user has viewed the 'suggested' pane. | 92 // Whether the user has viewed the 'suggested' pane. |
| 93 bool suggestions_viewed_; | 93 bool suggestions_viewed_; |
| 94 | 94 |
| 95 // Whether the user has performed a "tracked" action to leave the page or not. | 95 // Whether the user has performed a "tracked" action to leave the page or not. |
| 96 bool user_action_logged_; | 96 bool user_action_logged_; |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(SuggestionsHandler); | 98 DISALLOW_COPY_AND_ASSIGN(SuggestionsHandler); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_PAGE_HANDLER_H_ | 101 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SUGGESTIONS_PAGE_HANDLER_H_ |
| OLD | NEW |