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

Side by Side Diff: chrome/browser/dom_ui/new_tab_ui.h

Issue 147226: Make the new new tab page the default new tab page.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_DOM_UI_NEW_TAB_UI_H_ 5 #ifndef CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ 6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
7 7
8 #include "chrome/browser/dom_ui/dom_ui.h" 8 #include "chrome/browser/dom_ui/dom_ui.h"
9 #include "chrome/common/notification_registrar.h" 9 #include "chrome/common/notification_registrar.h"
10 10
11 class GURL; 11 class GURL;
12 class PrefService; 12 class PrefService;
13 class Profile; 13 class Profile;
14 14
15 namespace { 15 namespace {
16 class NewTabHTMLSource; 16 class NewTabHTMLSource;
17 } 17 }
18 18
19 // The TabContents used for the New Tab page. 19 // The TabContents used for the New Tab page.
20 class NewTabUI : public DOMUI, 20 class NewTabUI : public DOMUI,
21 public NotificationObserver { 21 public NotificationObserver {
22 public: 22 public:
23 explicit NewTabUI(TabContents* manager); 23 explicit NewTabUI(TabContents* manager);
24 ~NewTabUI(); 24 ~NewTabUI();
25 25
26 static void RegisterUserPrefs(PrefService* prefs); 26 static void RegisterUserPrefs(PrefService* prefs);
27 27
28 // Whether we should use the prototype new tab page.
29 static bool EnableNewNewTabPage();
30
31 // Whether we should enable the web resources backend service 28 // Whether we should enable the web resources backend service
32 static bool EnableWebResources(); 29 static bool EnableWebResources();
33 30
34 private: 31 private:
35 void Observe(NotificationType type, 32 void Observe(NotificationType type,
36 const NotificationSource& source, 33 const NotificationSource& source,
37 const NotificationDetails& details); 34 const NotificationDetails& details);
38 35
39 NotificationRegistrar registrar_; 36 NotificationRegistrar registrar_;
40 37
41 // The message id that should be displayed in this NewTabUIContents 38 // The message id that should be displayed in this NewTabUIContents
42 // instance's motd area. 39 // instance's motd area.
43 int motd_message_id_; 40 int motd_message_id_;
44 41
45 // Whether the user is in incognito mode or not, used to determine 42 // Whether the user is in incognito mode or not, used to determine
46 // what HTML to load. 43 // what HTML to load.
47 bool incognito_; 44 bool incognito_;
48 45
49 DISALLOW_COPY_AND_ASSIGN(NewTabUI); 46 DISALLOW_COPY_AND_ASSIGN(NewTabUI);
50 }; 47 };
51 48
52 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ 49 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698