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

Side by Side Diff: chrome/browser/ui/webui/options2/content_settings_handler2.h

Issue 9994005: Separate handler initialization from page initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move anything that indirectly calls JS to InitializePage Created 8 years, 8 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_OPTIONS2_CONTENT_SETTINGS_HANDLER2_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_CONTENT_SETTINGS_HANDLER2_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CONTENT_SETTINGS_HANDLER2_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CONTENT_SETTINGS_HANDLER2_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/plugin_data_remover_helper.h" 9 #include "chrome/browser/plugin_data_remover_helper.h"
10 #include "chrome/browser/prefs/pref_change_registrar.h" 10 #include "chrome/browser/prefs/pref_change_registrar.h"
11 #include "chrome/browser/ui/webui/options2/options_ui2.h" 11 #include "chrome/browser/ui/webui/options2/options_ui2.h"
12 #include "chrome/common/content_settings_types.h" 12 #include "chrome/common/content_settings_types.h"
13 #include "chrome/common/content_settings.h" 13 #include "chrome/common/content_settings.h"
14 #include "content/public/browser/notification_observer.h" 14 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 15 #include "content/public/browser/notification_registrar.h"
16 16
17 class HostContentSettingsMap; 17 class HostContentSettingsMap;
18 class ProtocolHandlerRegistry; 18 class ProtocolHandlerRegistry;
19 19
20 namespace options2 { 20 namespace options2 {
21 21
22 class ContentSettingsHandler : public OptionsPageUIHandler { 22 class ContentSettingsHandler : public OptionsPageUIHandler {
23 public: 23 public:
24 ContentSettingsHandler(); 24 ContentSettingsHandler();
25 virtual ~ContentSettingsHandler(); 25 virtual ~ContentSettingsHandler();
26 26
27 // OptionsPageUIHandler implementation. 27 // OptionsPageUIHandler implementation.
28 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; 28 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE;
29 virtual void InitializeHandler() OVERRIDE;
30 virtual void InitializePage() OVERRIDE; 29 virtual void InitializePage() OVERRIDE;
31 virtual void RegisterMessages() OVERRIDE; 30 virtual void RegisterMessages() OVERRIDE;
32 31
33 // content::NotificationObserver implementation. 32 // content::NotificationObserver implementation.
34 virtual void Observe(int type, 33 virtual void Observe(int type,
35 const content::NotificationSource& source, 34 const content::NotificationSource& source,
36 const content::NotificationDetails& details) OVERRIDE; 35 const content::NotificationDetails& details) OVERRIDE;
37 36
38 // Gets a string identifier for the group name, for use in HTML. 37 // Gets a string identifier for the group name, for use in HTML.
39 static std::string ContentSettingsTypeToGroupName(ContentSettingsType type); 38 static std::string ContentSettingsTypeToGroupName(ContentSettingsType type);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 111
113 content::NotificationRegistrar notification_registrar_; 112 content::NotificationRegistrar notification_registrar_;
114 PrefChangeRegistrar pref_change_registrar_; 113 PrefChangeRegistrar pref_change_registrar_;
115 114
116 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); 115 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler);
117 }; 116 };
118 117
119 } // namespace options2 118 } // namespace options2
120 119
121 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CONTENT_SETTINGS_HANDLER2_H_ 120 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CONTENT_SETTINGS_HANDLER2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698