Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 2369353002: Adds a pref and a policy to decide if PDFs should always be opened externally. (Closed)
Patch Set: Address comments. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 {"pdfHeader", IDS_PDF_HEADER},
511 {"pdfEnable", IDS_PDF_ENABLE_CHECKBOX},
508 }; 512 };
509 513
510 RegisterStrings(localized_strings, resources, arraysize(resources)); 514 RegisterStrings(localized_strings, resources, arraysize(resources));
511 515
512 // TODO(tommycli): When the HTML5 By Default feature flag is on, we want to 516 // 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 517 // 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. 518 // DETECT. Once this feature is finalized, then we migrate the setting to ASK.
515 bool is_hbd = base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins); 519 bool is_hbd = base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins);
516 static OptionsStringResource flash_strings[] = { 520 static OptionsStringResource flash_strings[] = {
517 {"pluginsDetectImportantContent", 521 {"pluginsDetectImportantContent",
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 1519
1516 // Exceptions apply only when the feature is enabled. 1520 // Exceptions apply only when the feature is enabled.
1517 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); 1521 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
1518 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); 1522 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM);
1519 web_ui()->CallJavascriptFunctionUnsafe( 1523 web_ui()->CallJavascriptFunctionUnsafe(
1520 "ContentSettings.enableProtectedContentExceptions", 1524 "ContentSettings.enableProtectedContentExceptions",
1521 base::FundamentalValue(enable_exceptions)); 1525 base::FundamentalValue(enable_exceptions));
1522 } 1526 }
1523 1527
1524 } // namespace options 1528 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698