| 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 #include "chrome/browser/ui/webui/options/content_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 26 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 27 #include "chrome/browser/notifications/desktop_notification_profile_util.h" | 27 #include "chrome/browser/notifications/desktop_notification_profile_util.h" |
| 28 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
| 29 #include "chrome/browser/ui/browser_list.h" | 29 #include "chrome/browser/ui/browser_list.h" |
| 30 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
| 31 #include "chrome/common/content_settings.h" | 31 #include "chrome/common/content_settings.h" |
| 32 #include "chrome/common/content_settings_pattern.h" | 32 #include "chrome/common/content_settings_pattern.h" |
| 33 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" | 33 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
| 34 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
| 35 #include "chrome/common/url_constants.h" | 35 #include "chrome/common/url_constants.h" |
| 36 #include "chrome/grit/generated_resources.h" |
| 36 #include "components/google/core/browser/google_util.h" | 37 #include "components/google/core/browser/google_util.h" |
| 37 #include "components/user_prefs/user_prefs.h" | 38 #include "components/user_prefs/user_prefs.h" |
| 38 #include "content/public/browser/notification_service.h" | 39 #include "content/public/browser/notification_service.h" |
| 39 #include "content/public/browser/notification_source.h" | 40 #include "content/public/browser/notification_source.h" |
| 40 #include "content/public/browser/notification_types.h" | 41 #include "content/public/browser/notification_types.h" |
| 41 #include "content/public/browser/user_metrics.h" | 42 #include "content/public/browser/user_metrics.h" |
| 42 #include "content/public/browser/web_contents.h" | 43 #include "content/public/browser/web_contents.h" |
| 43 #include "content/public/browser/web_ui.h" | 44 #include "content/public/browser/web_ui.h" |
| 44 #include "content/public/common/content_switches.h" | 45 #include "content/public/common/content_switches.h" |
| 45 #include "content/public/common/page_zoom.h" | 46 #include "content/public/common/page_zoom.h" |
| 46 #include "extensions/browser/extension_registry.h" | 47 #include "extensions/browser/extension_registry.h" |
| 47 #include "extensions/common/extension_set.h" | 48 #include "extensions/common/extension_set.h" |
| 48 #include "extensions/common/permissions/api_permission.h" | 49 #include "extensions/common/permissions/api_permission.h" |
| 49 #include "extensions/common/permissions/permissions_data.h" | 50 #include "extensions/common/permissions/permissions_data.h" |
| 50 #include "grit/generated_resources.h" | |
| 51 #include "grit/locale_settings.h" | 51 #include "grit/locale_settings.h" |
| 52 #include "ui/base/l10n/l10n_util.h" | 52 #include "ui/base/l10n/l10n_util.h" |
| 53 | 53 |
| 54 #if defined(OS_CHROMEOS) | 54 #if defined(OS_CHROMEOS) |
| 55 #include "components/user_manager/user_manager.h" | 55 #include "components/user_manager/user_manager.h" |
| 56 #endif | 56 #endif |
| 57 | 57 |
| 58 using base::UserMetricsAction; | 58 using base::UserMetricsAction; |
| 59 using content_settings::ContentSettingToString; | 59 using content_settings::ContentSettingToString; |
| 60 using content_settings::ContentSettingFromString; | 60 using content_settings::ContentSettingFromString; |
| (...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { | 1536 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { |
| 1537 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1537 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
| 1538 // Exceptions apply only when the feature is enabled. | 1538 // Exceptions apply only when the feature is enabled. |
| 1539 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1539 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
| 1540 web_ui()->CallJavascriptFunction( | 1540 web_ui()->CallJavascriptFunction( |
| 1541 "ContentSettings.enableProtectedContentExceptions", | 1541 "ContentSettings.enableProtectedContentExceptions", |
| 1542 base::FundamentalValue(enable_exceptions)); | 1542 base::FundamentalValue(enable_exceptions)); |
| 1543 } | 1543 } |
| 1544 | 1544 |
| 1545 } // namespace options | 1545 } // namespace options |
| OLD | NEW |