Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: chrome/browser/ui/webui/ntp/new_tab_ui.h

Issue 10827075: Use isDiscoveryInNTPEnabled flag instead of isSuggestionsPageEnabled flag to control suggestions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.js ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.js ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698