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

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

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 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
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 <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/prefs/pref_change_registrar.h" 11 #include "base/prefs/pref_change_registrar.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "base/timer.h" 13 #include "base/timer.h"
14 #include "content/public/browser/notification_observer.h" 14 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 15 #include "content/public/browser/notification_registrar.h"
16 #include "content/public/browser/url_data_source.h" 16 #include "content/public/browser/url_data_source.h"
17 #include "content/public/browser/web_ui_controller.h" 17 #include "content/public/browser/web_ui_controller.h"
18 18
19 class GURL; 19 class GURL;
20 class PrefRegistrySyncable;
21 class Profile; 20 class Profile;
22 21
23 namespace base { 22 namespace base {
24 class DictionaryValue; 23 class DictionaryValue;
25 } 24 }
26 25
26 namespace user_prefs {
27 class PrefRegistrySyncable;
28 }
29
27 // The WebUIController used for the New Tab page. 30 // The WebUIController used for the New Tab page.
28 class NewTabUI : public content::WebUIController, 31 class NewTabUI : public content::WebUIController,
29 public content::NotificationObserver { 32 public content::NotificationObserver {
30 public: 33 public:
31 explicit NewTabUI(content::WebUI* web_ui); 34 explicit NewTabUI(content::WebUI* web_ui);
32 virtual ~NewTabUI(); 35 virtual ~NewTabUI();
33 36
34 static void RegisterUserPrefs(PrefRegistrySyncable* registry); 37 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry);
35 38
36 // Returns whether or not to show apps pages. 39 // Returns whether or not to show apps pages.
37 static bool ShouldShowApps(); 40 static bool ShouldShowApps();
38 41
39 // Returns whether or not "Discovery" in the NTP is Enabled. 42 // Returns whether or not "Discovery" in the NTP is Enabled.
40 static bool IsDiscoveryInNTPEnabled(); 43 static bool IsDiscoveryInNTPEnabled();
41 44
42 // Adds "url", "title", and "direction" keys on incoming dictionary, setting 45 // Adds "url", "title", and "direction" keys on incoming dictionary, setting
43 // title as the url as a fallback on empty title. 46 // title as the url as a fallback on empty title.
44 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
122 125
123 // If the sync promo NTP bubble is being shown. 126 // If the sync promo NTP bubble is being shown.
124 bool showing_sync_bubble_; 127 bool showing_sync_bubble_;
125 128
126 PrefChangeRegistrar pref_change_registrar_; 129 PrefChangeRegistrar pref_change_registrar_;
127 130
128 DISALLOW_COPY_AND_ASSIGN(NewTabUI); 131 DISALLOW_COPY_AND_ASSIGN(NewTabUI);
129 }; 132 };
130 133
131 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ 134 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_page_handler.cc ('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