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

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

Issue 337011: NTP: Allow hiding tips and bookmark sync.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_SHOWN_SECTIONS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_
6 #define CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_ 6 #define CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_
7 7
8 #include "chrome/browser/dom_ui/dom_ui.h" 8 #include "chrome/browser/dom_ui/dom_ui.h"
9 9
10 class DOMUI; 10 class DOMUI;
11 class Value; 11 class Value;
12 class PrefService; 12 class PrefService;
13 13
14 // Use for the shown sections bitmask. 14 // Use for the shown sections bitmask.
15 enum Section { 15 enum Section {
16 THUMB = 1, 16 THUMB = 1,
17 LIST = 2, 17 LIST = 2,
18 RECENT = 4, 18 RECENT = 4,
19 TIPS = 8 19 TIPS = 8,
20 SYNC = 16
20 }; 21 };
21 22
22 class ShownSectionsHandler : public DOMMessageHandler { 23 class ShownSectionsHandler : public DOMMessageHandler {
23 public: 24 public:
24 ShownSectionsHandler() {} 25 ShownSectionsHandler() {}
25 virtual ~ShownSectionsHandler() {} 26 virtual ~ShownSectionsHandler() {}
26 27
27 // DOMMessageHandler implementation. 28 // DOMMessageHandler implementation.
28 virtual void RegisterMessages(); 29 virtual void RegisterMessages();
29 30
30 // Callback for "getShownSections" message. 31 // Callback for "getShownSections" message.
31 void HandleGetShownSections(const Value* value); 32 void HandleGetShownSections(const Value* value);
32 33
33 // Callback for "setShownSections" message. 34 // Callback for "setShownSections" message.
34 void HandleSetShownSections(const Value* value); 35 void HandleSetShownSections(const Value* value);
35 36
36 static void RegisterUserPrefs(PrefService* prefs); 37 static void RegisterUserPrefs(PrefService* prefs);
37 38
39 static void MigrateUserPrefs(PrefService* prefs, int old_pref_version,
40 int new_pref_version);
41
38 private: 42 private:
39 DISALLOW_COPY_AND_ASSIGN(ShownSectionsHandler); 43 DISALLOW_COPY_AND_ASSIGN(ShownSectionsHandler);
40 }; 44 };
41 45
42 #endif // CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_ 46 #endif // CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui_uitest.cc ('k') | chrome/browser/dom_ui/shown_sections_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698