| 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" |
| 11 #include "base/prefs/pref_change_registrar.h" | 11 #include "base/prefs/pref_change_registrar.h" |
| 12 #include "base/scoped_observer.h" | 12 #include "base/scoped_observer.h" |
| 13 #include "base/values.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/browser/ui/webui/options/pepper_flash_content_settings_utils.h" | 16 #include "chrome/browser/ui/webui/options/pepper_flash_content_settings_utils.h" |
| 16 #include "components/content_settings/core/browser/content_settings_observer.h" | 17 #include "components/content_settings/core/browser/content_settings_observer.h" |
| 17 #include "components/content_settings/core/common/content_settings.h" | 18 #include "components/content_settings/core/common/content_settings.h" |
| 18 #include "components/content_settings/core/common/content_settings_types.h" | 19 #include "components/content_settings/core/common/content_settings_types.h" |
| 19 #include "content/public/browser/host_zoom_map.h" | 20 #include "content/public/browser/host_zoom_map.h" |
| 20 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
| 21 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
| 22 | 23 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 218 |
| 218 // Gets the HostContentSettingsMap for the incognito profile, or NULL if there | 219 // Gets the HostContentSettingsMap for the incognito profile, or NULL if there |
| 219 // is no active incognito session. | 220 // is no active incognito session. |
| 220 HostContentSettingsMap* GetOTRContentSettingsMap(); | 221 HostContentSettingsMap* GetOTRContentSettingsMap(); |
| 221 | 222 |
| 222 // Gets the ProtocolHandlerRegistry for the normal profile. | 223 // Gets the ProtocolHandlerRegistry for the normal profile. |
| 223 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 224 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
| 224 | 225 |
| 225 void RefreshFlashMediaSettings(); | 226 void RefreshFlashMediaSettings(); |
| 226 | 227 |
| 228 // Returns exceptions constructed from the policy-set allowed URLs |
| 229 // for the content settings |type| mic or camera. |
| 230 scoped_ptr<base::ListValue> GetPolicyAllowedUrls(ContentSettingsType type); |
| 231 |
| 227 // Fills in |exceptions| with Values for the given |type| from |map|. | 232 // Fills in |exceptions| with Values for the given |type| from |map|. |
| 228 void GetExceptionsFromHostContentSettingsMap( | 233 void GetExceptionsFromHostContentSettingsMap( |
| 229 const HostContentSettingsMap* map, | 234 const HostContentSettingsMap* map, |
| 230 ContentSettingsType type, | 235 ContentSettingsType type, |
| 231 base::ListValue* exceptions); | 236 base::ListValue* exceptions); |
| 232 | 237 |
| 233 void OnPepperFlashPrefChanged(); | 238 void OnPepperFlashPrefChanged(); |
| 234 | 239 |
| 235 // content::HostZoomMap subscription. | 240 // content::HostZoomMap subscription. |
| 236 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); | 241 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 252 scoped_ptr<content::HostZoomMap::Subscription> | 257 scoped_ptr<content::HostZoomMap::Subscription> |
| 253 signin_host_zoom_map_subscription_; | 258 signin_host_zoom_map_subscription_; |
| 254 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; | 259 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; |
| 255 | 260 |
| 256 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); | 261 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); |
| 257 }; | 262 }; |
| 258 | 263 |
| 259 } // namespace options | 264 } // namespace options |
| 260 | 265 |
| 261 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ | 266 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
| OLD | NEW |