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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 class ContentSettingsHandler : public OptionsPageUIHandler, | 28 class ContentSettingsHandler : public OptionsPageUIHandler, |
29 public content_settings::Observer, | 29 public content_settings::Observer, |
30 public content::NotificationObserver, | 30 public content::NotificationObserver, |
31 public PepperFlashSettingsManager::Client { | 31 public PepperFlashSettingsManager::Client { |
32 public: | 32 public: |
33 ContentSettingsHandler(); | 33 ContentSettingsHandler(); |
34 virtual ~ContentSettingsHandler(); | 34 virtual ~ContentSettingsHandler(); |
35 | 35 |
36 // OptionsPageUIHandler implementation. | 36 // OptionsPageUIHandler implementation. |
37 virtual void GetLocalizedValues( | 37 virtual void GetLocalizedValues( |
38 base::DictionaryValue* localized_strings) OVERRIDE; | 38 base::DictionaryValue* localized_strings) override; |
39 virtual void InitializeHandler() OVERRIDE; | 39 virtual void InitializeHandler() override; |
40 virtual void InitializePage() OVERRIDE; | 40 virtual void InitializePage() override; |
41 virtual void RegisterMessages() OVERRIDE; | 41 virtual void RegisterMessages() override; |
42 | 42 |
43 // content_settings::Observer implementation. | 43 // content_settings::Observer implementation. |
44 virtual void OnContentSettingChanged( | 44 virtual void OnContentSettingChanged( |
45 const ContentSettingsPattern& primary_pattern, | 45 const ContentSettingsPattern& primary_pattern, |
46 const ContentSettingsPattern& secondary_pattern, | 46 const ContentSettingsPattern& secondary_pattern, |
47 ContentSettingsType content_type, | 47 ContentSettingsType content_type, |
48 std::string resource_identifier) OVERRIDE; | 48 std::string resource_identifier) override; |
49 | 49 |
50 // content::NotificationObserver implementation. | 50 // content::NotificationObserver implementation. |
51 virtual void Observe(int type, | 51 virtual void Observe(int type, |
52 const content::NotificationSource& source, | 52 const content::NotificationSource& source, |
53 const content::NotificationDetails& details) OVERRIDE; | 53 const content::NotificationDetails& details) override; |
54 | 54 |
55 // PepperFlashSettingsManager::Client implementation. | 55 // PepperFlashSettingsManager::Client implementation. |
56 virtual void OnGetPermissionSettingsCompleted( | 56 virtual void OnGetPermissionSettingsCompleted( |
57 uint32 request_id, | 57 uint32 request_id, |
58 bool success, | 58 bool success, |
59 PP_Flash_BrowserOperations_Permission default_permission, | 59 PP_Flash_BrowserOperations_Permission default_permission, |
60 const ppapi::FlashSiteSettings& sites) OVERRIDE; | 60 const ppapi::FlashSiteSettings& sites) override; |
61 | 61 |
62 // Gets a string identifier for the group name, for use in HTML. | 62 // Gets a string identifier for the group name, for use in HTML. |
63 static std::string ContentSettingsTypeToGroupName(ContentSettingsType type); | 63 static std::string ContentSettingsTypeToGroupName(ContentSettingsType type); |
64 | 64 |
65 private: | 65 private: |
66 // Used to determine whether we should show links to Flash camera and | 66 // Used to determine whether we should show links to Flash camera and |
67 // microphone settings. | 67 // microphone settings. |
68 struct MediaSettingsInfo { | 68 struct MediaSettingsInfo { |
69 MediaSettingsInfo(); | 69 MediaSettingsInfo(); |
70 ~MediaSettingsInfo(); | 70 ~MediaSettingsInfo(); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 MediaSettingsInfo media_settings_; | 232 MediaSettingsInfo media_settings_; |
233 scoped_ptr<content::HostZoomMap::Subscription> host_zoom_map_subscription_; | 233 scoped_ptr<content::HostZoomMap::Subscription> host_zoom_map_subscription_; |
234 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; | 234 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; |
235 | 235 |
236 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); | 236 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); |
237 }; | 237 }; |
238 | 238 |
239 } // namespace options | 239 } // namespace options |
240 | 240 |
241 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ | 241 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
OLD | NEW |