| 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_NEW_TAB_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 static void RegisterUserPrefs(PrefService* prefs); | 31 static void RegisterUserPrefs(PrefService* prefs); |
| 32 | 32 |
| 33 // Sets up any experiment in which the NTP might want to participate. | 33 // Sets up any experiment in which the NTP might want to participate. |
| 34 // The CWS footer link is one such example. | 34 // The CWS footer link is one such example. |
| 35 static void SetupFieldTrials(); | 35 static void SetupFieldTrials(); |
| 36 | 36 |
| 37 // Returns whether or not the CWS footer experiment is enabled. | 37 // Returns whether or not the CWS footer experiment is enabled. |
| 38 static bool IsWebStoreExperimentEnabled(); | 38 static bool IsWebStoreExperimentEnabled(); |
| 39 | 39 |
| 40 // Returns whether or not the "suggested links page" is enabled. |
| 41 static bool IsSuggestionsPageEnabled(); |
| 42 |
| 40 // Adds "url", "title", and "direction" keys on incoming dictionary, setting | 43 // Adds "url", "title", and "direction" keys on incoming dictionary, setting |
| 41 // title as the url as a fallback on empty title. | 44 // title as the url as a fallback on empty title. |
| 42 static void SetURLTitleAndDirection(base::DictionaryValue* dictionary, | 45 static void SetURLTitleAndDirection(base::DictionaryValue* dictionary, |
| 43 const string16& title, | 46 const string16& title, |
| 44 const GURL& gurl); | 47 const GURL& gurl); |
| 45 | 48 |
| 46 // Returns a pointer to a NewTabUI if the WebUIController object is a new tab | 49 // Returns a pointer to a NewTabUI if the WebUIController object is a new tab |
| 47 // page. | 50 // page. |
| 48 static NewTabUI* FromWebUIController(content::WebUIController* ui); | 51 static NewTabUI* FromWebUIController(content::WebUIController* ui); |
| 49 | 52 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // The preference version. This used for migrating prefs of the NTP. | 113 // The preference version. This used for migrating prefs of the NTP. |
| 111 static const int current_pref_version_ = 3; | 114 static const int current_pref_version_ = 3; |
| 112 | 115 |
| 113 // If the sync promo NTP bubble is being shown. | 116 // If the sync promo NTP bubble is being shown. |
| 114 bool showing_sync_bubble_; | 117 bool showing_sync_bubble_; |
| 115 | 118 |
| 116 DISALLOW_COPY_AND_ASSIGN(NewTabUI); | 119 DISALLOW_COPY_AND_ASSIGN(NewTabUI); |
| 117 }; | 120 }; |
| 118 | 121 |
| 119 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ | 122 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
| OLD | NEW |