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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/scoped_observer.h" | 14 #include "base/scoped_observer.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/browser/pepper_flash_settings_manager.h" | 16 #include "chrome/browser/pepper_flash_settings_manager.h" |
17 #include "chrome/browser/ui/webui/options/options_ui.h" | 17 #include "chrome/browser/ui/webui/options/options_ui.h" |
18 #include "chrome/browser/ui/webui/options/pepper_flash_content_settings_utils.h" | 18 #include "chrome/browser/ui/webui/options/pepper_flash_content_settings_utils.h" |
| 19 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" |
19 #include "components/content_settings/core/browser/content_settings_observer.h" | 20 #include "components/content_settings/core/browser/content_settings_observer.h" |
20 #include "components/content_settings/core/common/content_settings.h" | 21 #include "components/content_settings/core/common/content_settings.h" |
21 #include "components/content_settings/core/common/content_settings_types.h" | 22 #include "components/content_settings/core/common/content_settings_types.h" |
22 #include "components/prefs/pref_change_registrar.h" | 23 #include "components/prefs/pref_change_registrar.h" |
23 #include "content/public/browser/host_zoom_map.h" | 24 #include "content/public/browser/host_zoom_map.h" |
24 #include "content/public/browser/notification_observer.h" | 25 #include "content/public/browser/notification_observer.h" |
25 #include "content/public/browser/notification_registrar.h" | 26 #include "content/public/browser/notification_registrar.h" |
26 | 27 |
27 class HostContentSettingsMap; | 28 class HostContentSettingsMap; |
28 class Profile; | 29 class Profile; |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 249 |
249 // Gets the ProtocolHandlerRegistry for the normal profile. | 250 // Gets the ProtocolHandlerRegistry for the normal profile. |
250 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 251 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
251 | 252 |
252 void RefreshFlashMediaSettings(); | 253 void RefreshFlashMediaSettings(); |
253 | 254 |
254 void OnPepperFlashPrefChanged(); | 255 void OnPepperFlashPrefChanged(); |
255 | 256 |
256 // content::HostZoomMap subscription. | 257 // content::HostZoomMap subscription. |
257 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); | 258 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); |
| 259 // ChromeZoomLevelPrefs::DefaultZoomScopeSubscription subscription. |
| 260 void OnZoomScopeChanged(); |
258 | 261 |
259 void ShowFlashMediaLink( | 262 void ShowFlashMediaLink( |
260 LinkType link_type, ContentSettingsType content_type, bool show); | 263 LinkType link_type, ContentSettingsType content_type, bool show); |
261 | 264 |
262 void UpdateFlashMediaLinksVisibility(ContentSettingsType type); | 265 void UpdateFlashMediaLinksVisibility(ContentSettingsType type); |
263 | 266 |
264 void UpdateMediaDeviceDropdownVisibility(ContentSettingsType type); | 267 void UpdateMediaDeviceDropdownVisibility(ContentSettingsType type); |
265 | 268 |
266 void UpdateProtectedContentExceptionsButton(); | 269 void UpdateProtectedContentExceptionsButton(); |
267 | 270 |
| 271 void UpdateZoomScopeExplanationVisibility(); |
| 272 |
268 // Member variables --------------------------------------------------------- | 273 // Member variables --------------------------------------------------------- |
269 | 274 |
270 content::NotificationRegistrar notification_registrar_; | 275 content::NotificationRegistrar notification_registrar_; |
271 PrefChangeRegistrar pref_change_registrar_; | 276 PrefChangeRegistrar pref_change_registrar_; |
272 std::unique_ptr<PepperFlashSettingsManager> flash_settings_manager_; | 277 std::unique_ptr<PepperFlashSettingsManager> flash_settings_manager_; |
273 std::unique_ptr<MediaSettingsInfo> media_settings_; | 278 std::unique_ptr<MediaSettingsInfo> media_settings_; |
274 std::unique_ptr<content::HostZoomMap::Subscription> | 279 std::unique_ptr<content::HostZoomMap::Subscription> |
275 host_zoom_map_subscription_; | 280 host_zoom_map_subscription_; |
276 std::unique_ptr<content::HostZoomMap::Subscription> | 281 std::unique_ptr<content::HostZoomMap::Subscription> |
277 signin_host_zoom_map_subscription_; | 282 signin_host_zoom_map_subscription_; |
| 283 std::unique_ptr<ChromeZoomLevelPrefs::DefaultZoomScopeSubscription> |
| 284 default_zoom_scope_subscription_; |
278 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; | 285 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; |
279 | 286 |
280 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); | 287 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); |
281 }; | 288 }; |
282 | 289 |
283 } // namespace options | 290 } // namespace options |
284 | 291 |
285 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ | 292 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
OLD | NEW |