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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SHOWN_SECTIONS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_SHOWN_SECTIONS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_SHOWN_SECTIONS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_SHOWN_SECTIONS_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/prefs/pref_change_registrar.h" 9 #include "chrome/browser/prefs/pref_change_registrar.h"
10 #include "content/browser/webui/web_ui.h" 10 #include "content/browser/webui/web_ui.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 static int GetShownSections(PrefService* pref_service); 43 static int GetShownSections(PrefService* pref_service);
44 44
45 // Expands |section|, collapsing any previously expanded section. This is the 45 // Expands |section|, collapsing any previously expanded section. This is the
46 // same thing that happens if a user clicks on |section|. 46 // same thing that happens if a user clicks on |section|.
47 static void SetShownSection(PrefService* prefs, Section section); 47 static void SetShownSection(PrefService* prefs, Section section);
48 48
49 // WebUIMessageHandler implementation. 49 // WebUIMessageHandler implementation.
50 virtual void RegisterMessages(); 50 virtual void RegisterMessages();
51 51
52 // NotificationObserver implementation. 52 // NotificationObserver implementation.
53 virtual void Observe(NotificationType type, 53 virtual void Observe(int type,
54 const NotificationSource& source, 54 const NotificationSource& source,
55 const NotificationDetails& details); 55 const NotificationDetails& details);
56 56
57 // Callback for "getShownSections" message. 57 // Callback for "getShownSections" message.
58 void HandleGetShownSections(const ListValue* args); 58 void HandleGetShownSections(const ListValue* args);
59 59
60 // Callback for "setShownSections" message. 60 // Callback for "setShownSections" message.
61 void HandleSetShownSections(const ListValue* args); 61 void HandleSetShownSections(const ListValue* args);
62 62
63 static void RegisterUserPrefs(PrefService* pref_service); 63 static void RegisterUserPrefs(PrefService* pref_service);
64 64
65 static void MigrateUserPrefs(PrefService* pref_service, 65 static void MigrateUserPrefs(PrefService* pref_service,
66 int old_pref_version, 66 int old_pref_version,
67 int new_pref_version); 67 int new_pref_version);
68 68
69 static void OnExtensionInstalled(PrefService* prefs, 69 static void OnExtensionInstalled(PrefService* prefs,
70 const Extension* extension); 70 const Extension* extension);
71 71
72 private: 72 private:
73 PrefService* pref_service_; 73 PrefService* pref_service_;
74 PrefChangeRegistrar pref_registrar_; 74 PrefChangeRegistrar pref_registrar_;
75 75
76 DISALLOW_COPY_AND_ASSIGN(ShownSectionsHandler); 76 DISALLOW_COPY_AND_ASSIGN(ShownSectionsHandler);
77 }; 77 };
78 78
79 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SHOWN_SECTIONS_HANDLER_H_ 79 #endif // CHROME_BROWSER_UI_WEBUI_NTP_SHOWN_SECTIONS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache.cc ('k') | chrome/browser/ui/webui/ntp/shown_sections_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698