summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_metadata.h
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2018-04-13 16:43:05 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-13 16:43:05 +0000
commite04b66cc759c2cf0ceafae47340fdf9588ca2e23 (patch)
tree5b7e8da1e61d1b6dc9550fb599722681e65572fc /core/fpdfdoc/cpdf_metadata.h
parent996c93068bfc8b443c77b735bc6400285bc8a407 (diff)
downloadpdfium-e04b66cc759c2cf0ceafae47340fdf9588ca2e23.tar.xz
Move SharedForm check to CPDF_Metadata class
This CL moves code related to shared form detection into the CPDF_Metadata class. This allows us to hide the usage of CXML inside CPDF_Metadata. Change-Id: I547471a2bcc119221565c415a58211c1500cbb3c Reviewed-on: https://pdfium-review.googlesource.com/30370 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_metadata.h')
-rw-r--r--core/fpdfdoc/cpdf_metadata.h33
1 files changed, 27 insertions, 6 deletions
diff --git a/core/fpdfdoc/cpdf_metadata.h b/core/fpdfdoc/cpdf_metadata.h
index fa958153fc..edf1938c4e 100644
--- a/core/fpdfdoc/cpdf_metadata.h
+++ b/core/fpdfdoc/cpdf_metadata.h
@@ -8,19 +8,40 @@
#define CORE_FPDFDOC_CPDF_METADATA_H_
#include <memory>
-
-class CPDF_Document;
-class CXML_Element;
+#include <vector>
+
+#include "core/fxcrt/unowned_ptr.h"
+
+class CPDF_Stream;
+
+enum class UnsupportedFeature : uint8_t {
+ kDocumentXFAForm = 1,
+ kDocumentPortableCollection = 2,
+ kDocumentAttachment = 3,
+ kDocumentSecurity = 4,
+ kDocumentSharedReview = 5,
+ kDocumentSharedFormAcrobat = 6,
+ kDocumentSharedFormFilesystem = 7,
+ kDocumentSharedFormEmail = 8,
+
+ kAnnotation3d = 11,
+ kAnnotationMovie = 12,
+ kAnnotationSound = 13,
+ kAnnotationScreenMedia = 14,
+ kAnnotationScreenRichMedia = 15,
+ kAnnotationAttachment = 16,
+ kAnnotationSignature = 17
+};
class CPDF_Metadata {
public:
- explicit CPDF_Metadata(const CPDF_Document* pDoc);
+ explicit CPDF_Metadata(const CPDF_Stream* pStream);
~CPDF_Metadata();
- const CXML_Element* GetRoot() const;
+ std::vector<UnsupportedFeature> CheckForSharedForm() const;
private:
- std::unique_ptr<CXML_Element> m_pXmlElement;
+ UnownedPtr<const CPDF_Stream> stream_;
};
#endif // CORE_FPDFDOC_CPDF_METADATA_H_