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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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) 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_PAGE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
11 #include "content/public/browser/web_ui_message_handler.h" 11 #include "content/public/browser/web_ui_message_handler.h"
12 12
13 class PrefRegistrySimple; 13 class PrefRegistrySimple;
14 class Profile; 14 class Profile;
15 15
16 namespace user_prefs { 16 namespace user_prefs {
17 class PrefRegistrySyncable; 17 class PrefRegistrySyncable;
18 } 18 }
19 19
20 // Handler for general New Tab Page functionality that does not belong in a 20 // Handler for general New Tab Page functionality that does not belong in a
21 // more specialized handler. 21 // more specialized handler.
22 class NewTabPageHandler : public content::WebUIMessageHandler, 22 class NewTabPageHandler : public content::WebUIMessageHandler,
23 public base::SupportsWeakPtr<NewTabPageHandler> { 23 public base::SupportsWeakPtr<NewTabPageHandler> {
24 public: 24 public:
25 NewTabPageHandler(); 25 NewTabPageHandler();
26 26
27 // Register NTP per-profile preferences. 27 // Register NTP per-profile preferences.
28 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); 28 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
29 29
30 // Registers values (strings etc.) for the page. 30 // Registers values (strings etc.) for the page.
31 static void GetLocalizedValues(Profile* profile, DictionaryValue* values); 31 static void GetLocalizedValues(Profile* profile, DictionaryValue* values);
32 32
33 private: 33 private:
34 virtual ~NewTabPageHandler(); 34 virtual ~NewTabPageHandler();
35 35
36 // WebUIMessageHandler implementation. 36 // WebUIMessageHandler implementation.
37 virtual void RegisterMessages() OVERRIDE; 37 virtual void RegisterMessages() OVERRIDE;
38 38
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 static const int kHistogramEnumerationMax = 79 static const int kHistogramEnumerationMax =
80 (LAST_PAGE_ID >> kPageIdOffset) + 1; 80 (LAST_PAGE_ID >> kPageIdOffset) + 1;
81 81
82 // Helper to send out promo resource change notification. 82 // Helper to send out promo resource change notification.
83 void Notify(chrome::NotificationType notification_type); 83 void Notify(chrome::NotificationType notification_type);
84 84
85 DISALLOW_COPY_AND_ASSIGN(NewTabPageHandler); 85 DISALLOW_COPY_AND_ASSIGN(NewTabPageHandler);
86 }; 86 };
87 87
88 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ 88 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/most_visited_handler.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698