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

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

Issue 131094: Add GetMessageHandlers to HtmlDialogUIDelegate to allow... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/dom_ui/new_tab_ui.cc ('k') | chrome/browser/dom_ui/shown_sections_handler.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) 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 }; 20 };
21 21
22 class ShownSectionsHandler : public DOMMessageHandler { 22 class ShownSectionsHandler : public DOMMessageHandler {
23 public: 23 public:
24 explicit ShownSectionsHandler(DOMUI* dom_ui); 24 ShownSectionsHandler() { }
25 virtual ~ShownSectionsHandler() { }
26
27 // DOMMessageHandler implementation.
28 virtual void RegisterMessages();
25 29
26 // Callback for "getShownSections" message. 30 // Callback for "getShownSections" message.
27 void HandleGetShownSections(const Value* value); 31 void HandleGetShownSections(const Value* value);
28 32
29 // Callback for "setShownSections" message. 33 // Callback for "setShownSections" message.
30 void HandleSetShownSections(const Value* value); 34 void HandleSetShownSections(const Value* value);
31 35
32 static void RegisterUserPrefs(PrefService* prefs); 36 static void RegisterUserPrefs(PrefService* prefs);
33 37
34 private: 38 private:
35 DOMUI* dom_ui_; 39 DOMUI* dom_ui_;
36 40
37 DISALLOW_COPY_AND_ASSIGN(ShownSectionsHandler); 41 DISALLOW_COPY_AND_ASSIGN(ShownSectionsHandler);
38 }; 42 };
39 43
40 #endif // CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_ 44 #endif // CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.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