fix: set presentationModeEnabled value for PDF viewer (#27223)

This commit is contained in:
Shelley Vohr 2021-01-10 17:48:39 -08:00 committed by GitHub
parent 36f4ee87df
commit e74b425803
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,14 +63,17 @@ void AddStringsForPdf(base::DictionaryValue* dict) {
void AddAdditionalDataForPdf(base::DictionaryValue* dict) {
#if BUILDFLAG(ENABLE_PDF)
dict->SetKey("pdfFormSaveEnabled",
base::Value(base::FeatureList::IsEnabled(
chrome_pdf::features::kSaveEditedPDFForm)));
dict->SetStringKey(
"pdfViewerUpdateEnabledAttribute",
base::FeatureList::IsEnabled(chrome_pdf::features::kPDFViewerUpdate)
? "pdf-viewer-update-enabled"
: "");
dict->SetKey("pdfFormSaveEnabled",
dict->SetKey("presentationModeEnabled",
base::Value(base::FeatureList::IsEnabled(
chrome_pdf::features::kSaveEditedPDFForm)));
chrome_pdf::features::kPdfViewerPresentationMode)));
dict->SetKey("pdfAnnotationsEnabled", base::Value(false));
dict->SetKey("printingEnabled", base::Value(true));
#endif // BUILDFLAG(ENABLE_PDF)