OLD | NEW |
---|---|
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_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/prefs/public/pref_change_registrar.h" | 12 #include "base/prefs/public/pref_change_registrar.h" |
13 #include "base/prefs/public/pref_observer.h" | |
13 #include "chrome/browser/pepper_flash_settings_manager.h" | 14 #include "chrome/browser/pepper_flash_settings_manager.h" |
14 #include "chrome/browser/ui/webui/options/options_ui.h" | 15 #include "chrome/browser/ui/webui/options/options_ui.h" |
15 #include "chrome/common/content_settings.h" | 16 #include "chrome/common/content_settings.h" |
16 #include "chrome/common/content_settings_types.h" | 17 #include "chrome/common/content_settings_types.h" |
17 #include "content/public/browser/notification_observer.h" | 18 #include "content/public/browser/notification_observer.h" |
18 #include "content/public/browser/notification_registrar.h" | 19 #include "content/public/browser/notification_registrar.h" |
19 | 20 |
20 class HostContentSettingsMap; | 21 class HostContentSettingsMap; |
21 class ProtocolHandlerRegistry; | 22 class ProtocolHandlerRegistry; |
22 | 23 |
23 namespace options { | 24 namespace options { |
24 | 25 |
25 class ContentSettingsHandler : public OptionsPageUIHandler, | 26 class ContentSettingsHandler |
26 public PepperFlashSettingsManager::Client { | 27 : public OptionsPageUIHandler, |
Mattias Nissler (ping if slow)
2012/10/31 13:29:36
Any reasons to reformat this? I think this is lega
Jói
2012/10/31 14:56:26
I don't have to reformat it (or the others where i
| |
28 public PepperFlashSettingsManager::Client, | |
29 public PrefObserver { | |
27 public: | 30 public: |
28 ContentSettingsHandler(); | 31 ContentSettingsHandler(); |
29 virtual ~ContentSettingsHandler(); | 32 virtual ~ContentSettingsHandler(); |
30 | 33 |
31 // OptionsPageUIHandler implementation. | 34 // OptionsPageUIHandler implementation. |
32 virtual void GetLocalizedValues( | 35 virtual void GetLocalizedValues( |
33 base::DictionaryValue* localized_strings) OVERRIDE; | 36 base::DictionaryValue* localized_strings) OVERRIDE; |
34 virtual void InitializeHandler() OVERRIDE; | 37 virtual void InitializeHandler() OVERRIDE; |
35 virtual void InitializePage() OVERRIDE; | 38 virtual void InitializePage() OVERRIDE; |
36 virtual void RegisterMessages() OVERRIDE; | 39 virtual void RegisterMessages() OVERRIDE; |
37 | 40 |
38 // content::NotificationObserver implementation. | 41 // content::NotificationObserver implementation. |
39 virtual void Observe(int type, | 42 virtual void Observe(int type, |
40 const content::NotificationSource& source, | 43 const content::NotificationSource& source, |
41 const content::NotificationDetails& details) OVERRIDE; | 44 const content::NotificationDetails& details) OVERRIDE; |
42 | 45 |
46 // PrefObserver implementation. | |
47 virtual void OnPreferenceChanged(PrefServiceBase* service, | |
48 const std::string& pref_name) OVERRIDE; | |
49 | |
43 // PepperFlashSettingsManager::Client implementation. | 50 // PepperFlashSettingsManager::Client implementation. |
44 virtual void OnGetPermissionSettingsCompleted( | 51 virtual void OnGetPermissionSettingsCompleted( |
45 uint32 request_id, | 52 uint32 request_id, |
46 bool success, | 53 bool success, |
47 PP_Flash_BrowserOperations_Permission default_permission, | 54 PP_Flash_BrowserOperations_Permission default_permission, |
48 const ppapi::FlashSiteSettings& sites) OVERRIDE; | 55 const ppapi::FlashSiteSettings& sites) OVERRIDE; |
49 | 56 |
50 // Gets a string identifier for the group name, for use in HTML. | 57 // Gets a string identifier for the group name, for use in HTML. |
51 static std::string ContentSettingsTypeToGroupName(ContentSettingsType type); | 58 static std::string ContentSettingsTypeToGroupName(ContentSettingsType type); |
52 | 59 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 | 190 |
184 static const ExContentSettingsTypeNameEntry | 191 static const ExContentSettingsTypeNameEntry |
185 kExContentSettingsTypeGroupNames[]; | 192 kExContentSettingsTypeGroupNames[]; |
186 | 193 |
187 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); | 194 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); |
188 }; | 195 }; |
189 | 196 |
190 } // namespace options | 197 } // namespace options |
191 | 198 |
192 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ | 199 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
OLD | NEW |