| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class PrefRegistrySyncable; | 27 class PrefRegistrySyncable; |
| 28 } | 28 } |
| 29 | 29 |
| 30 // The WebUIController used for the New Tab page. | 30 // The WebUIController used for the New Tab page. |
| 31 class NewTabUI : public content::WebUIController, | 31 class NewTabUI : public content::WebUIController, |
| 32 public content::NotificationObserver { | 32 public content::NotificationObserver { |
| 33 public: | 33 public: |
| 34 explicit NewTabUI(content::WebUI* web_ui); | 34 explicit NewTabUI(content::WebUI* web_ui); |
| 35 virtual ~NewTabUI(); | 35 virtual ~NewTabUI(); |
| 36 | 36 |
| 37 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 37 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 38 | 38 |
| 39 // Returns whether or not to show apps pages. | 39 // Returns whether or not to show apps pages. |
| 40 static bool ShouldShowApps(); | 40 static bool ShouldShowApps(); |
| 41 | 41 |
| 42 // Returns whether or not "Discovery" in the NTP is Enabled. | 42 // Returns whether or not "Discovery" in the NTP is Enabled. |
| 43 static bool IsDiscoveryInNTPEnabled(); | 43 static bool IsDiscoveryInNTPEnabled(); |
| 44 | 44 |
| 45 // Adds "url", "title", and "direction" keys on incoming dictionary, setting | 45 // Adds "url", "title", and "direction" keys on incoming dictionary, setting |
| 46 // title as the url as a fallback on empty title. | 46 // title as the url as a fallback on empty title. |
| 47 static void SetUrlTitleAndDirection(base::DictionaryValue* dictionary, | 47 static void SetUrlTitleAndDirection(base::DictionaryValue* dictionary, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 // If the sync promo NTP bubble is being shown. | 126 // If the sync promo NTP bubble is being shown. |
| 127 bool showing_sync_bubble_; | 127 bool showing_sync_bubble_; |
| 128 | 128 |
| 129 PrefChangeRegistrar pref_change_registrar_; | 129 PrefChangeRegistrar pref_change_registrar_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(NewTabUI); | 131 DISALLOW_COPY_AND_ASSIGN(NewTabUI); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ | 134 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
| OLD | NEW |