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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 public content::NotificationObserver { | 27 public content::NotificationObserver { |
28 public: | 28 public: |
29 explicit NewTabUI(content::WebUI* web_ui); | 29 explicit NewTabUI(content::WebUI* web_ui); |
30 virtual ~NewTabUI(); | 30 virtual ~NewTabUI(); |
31 | 31 |
32 static void RegisterUserPrefs(PrefService* prefs); | 32 static void RegisterUserPrefs(PrefService* prefs); |
33 | 33 |
34 // Returns whether or not to show apps pages. | 34 // Returns whether or not to show apps pages. |
35 static bool ShouldShowApps(); | 35 static bool ShouldShowApps(); |
36 | 36 |
37 // Returns whether or not the "suggestions links page" is enabled. | 37 // Returns whether or not "Discovery" in the NTP is Enabled. |
38 static bool IsSuggestionsPageEnabled(); | 38 static bool IsDiscoveryInNTPEnabled(); |
39 | 39 |
40 // Adds "url", "title", and "direction" keys on incoming dictionary, setting | 40 // Adds "url", "title", and "direction" keys on incoming dictionary, setting |
41 // title as the url as a fallback on empty title. | 41 // title as the url as a fallback on empty title. |
42 static void SetURLTitleAndDirection(base::DictionaryValue* dictionary, | 42 static void SetURLTitleAndDirection(base::DictionaryValue* dictionary, |
43 const string16& title, | 43 const string16& title, |
44 const GURL& gurl); | 44 const GURL& gurl); |
45 | 45 |
46 // Returns a pointer to a NewTabUI if the WebUIController object is a new tab | 46 // Returns a pointer to a NewTabUI if the WebUIController object is a new tab |
47 // page. | 47 // page. |
48 static NewTabUI* FromWebUIController(content::WebUIController* ui); | 48 static NewTabUI* FromWebUIController(content::WebUIController* ui); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 // If the sync promo NTP bubble is being shown. | 125 // If the sync promo NTP bubble is being shown. |
126 bool showing_sync_bubble_; | 126 bool showing_sync_bubble_; |
127 | 127 |
128 PrefChangeRegistrar pref_change_registrar_; | 128 PrefChangeRegistrar pref_change_registrar_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(NewTabUI); | 130 DISALLOW_COPY_AND_ASSIGN(NewTabUI); |
131 }; | 131 }; |
132 | 132 |
133 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ | 133 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
OLD | NEW |