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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 {"backgroundSyncAllow", IDS_BACKGROUND_SYNC_ALLOW_RADIO}, | 498 {"backgroundSyncAllow", IDS_BACKGROUND_SYNC_ALLOW_RADIO}, |
499 {"backgroundSyncBlock", IDS_BACKGROUND_SYNC_BLOCK_RADIO}, | 499 {"backgroundSyncBlock", IDS_BACKGROUND_SYNC_BLOCK_RADIO}, |
500 // Zoom levels. | 500 // Zoom levels. |
501 {"zoomlevelsHeader", IDS_ZOOMLEVELS_HEADER_AND_TAB_LABEL}, | 501 {"zoomlevelsHeader", IDS_ZOOMLEVELS_HEADER_AND_TAB_LABEL}, |
502 {"zoomLevelsManage", IDS_ZOOMLEVELS_MANAGE_BUTTON}, | 502 {"zoomLevelsManage", IDS_ZOOMLEVELS_MANAGE_BUTTON}, |
503 // Keygen filter. | 503 // Keygen filter. |
504 {"keygenTabLabel", IDS_KEYGEN_TAB_LABEL}, | 504 {"keygenTabLabel", IDS_KEYGEN_TAB_LABEL}, |
505 {"keygenHeader", IDS_KEYGEN_HEADER}, | 505 {"keygenHeader", IDS_KEYGEN_HEADER}, |
506 {"keygenAllow", IDS_KEYGEN_ALLOW_RADIO}, | 506 {"keygenAllow", IDS_KEYGEN_ALLOW_RADIO}, |
507 {"keygenBlock", IDS_KEYGEN_DONOTALLOW_RADIO}, | 507 {"keygenBlock", IDS_KEYGEN_DONOTALLOW_RADIO}, |
| 508 // PDF Plugin filter. |
| 509 {"pdfTabLabel", IDS_PDF_TAB_LABEL}, |
| 510 {"pdfEnable", IDS_PDF_ENABLE_CHECKBOX}, |
508 }; | 511 }; |
509 | 512 |
510 RegisterStrings(localized_strings, resources, arraysize(resources)); | 513 RegisterStrings(localized_strings, resources, arraysize(resources)); |
511 | 514 |
512 // TODO(tommycli): When the HTML5 By Default feature flag is on, we want to | 515 // TODO(tommycli): When the HTML5 By Default feature flag is on, we want to |
513 // display strings that begin with "Ask...", even though the setting remains | 516 // display strings that begin with "Ask...", even though the setting remains |
514 // DETECT. Once this feature is finalized, then we migrate the setting to ASK. | 517 // DETECT. Once this feature is finalized, then we migrate the setting to ASK. |
515 bool is_hbd = base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins); | 518 bool is_hbd = base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins); |
516 static OptionsStringResource flash_strings[] = { | 519 static OptionsStringResource flash_strings[] = { |
517 {"pluginsDetectImportantContent", | 520 {"pluginsDetectImportantContent", |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1515 | 1518 |
1516 // Exceptions apply only when the feature is enabled. | 1519 // Exceptions apply only when the feature is enabled. |
1517 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1520 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
1518 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1521 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1519 web_ui()->CallJavascriptFunctionUnsafe( | 1522 web_ui()->CallJavascriptFunctionUnsafe( |
1520 "ContentSettings.enableProtectedContentExceptions", | 1523 "ContentSettings.enableProtectedContentExceptions", |
1521 base::FundamentalValue(enable_exceptions)); | 1524 base::FundamentalValue(enable_exceptions)); |
1522 } | 1525 } |
1523 | 1526 |
1524 } // namespace options | 1527 } // namespace options |
OLD | NEW |