Move permission constants to constants/access_permissions.h.
Move them out of core/fpdfapi/parser/cpdf_document.h, remove "FPDF" from
their names, and make them real constants.
Change-Id: Ib93027dd1321be76b23a277fcc6a91a387099074
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65620
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/constants/BUILD.gn b/constants/BUILD.gn
index 4c10fed..4489b66 100644
--- a/constants/BUILD.gn
+++ b/constants/BUILD.gn
@@ -6,6 +6,7 @@
source_set("constants") {
sources = [
+ "access_permissions.h",
"annotation_common.h",
"annotation_flags.h",
"form_fields.h",
diff --git a/constants/access_permissions.h b/constants/access_permissions.h
new file mode 100644
index 0000000..cac187a
--- /dev/null
+++ b/constants/access_permissions.h
@@ -0,0 +1,21 @@
+// Copyright 2020 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONSTANTS_ACCESS_PERMISSIONS_H_
+#define CONSTANTS_ACCESS_PERMISSIONS_H_
+
+namespace pdfium {
+namespace access_permissions {
+
+// PDF 1.7 spec, table 3.20.
+// User access permissions.
+constexpr uint32_t kModifyContent = 1 << 3;
+constexpr uint32_t kModifyAnnotation = 1 << 5;
+constexpr uint32_t kFillForm = 1 << 8;
+constexpr uint32_t kExtractForAccessibility = 1 << 9;
+
+} // namespace access_permissions
+} // namespace pdfium
+
+#endif // CONSTANTS_ACCESS_PERMISSIONS_H_