Chromium Code Reviews| Index: core/fpdfdoc/include/cpdf_annot.h |
| diff --git a/core/fpdfdoc/include/cpdf_annot.h b/core/fpdfdoc/include/cpdf_annot.h |
| index 82b3d3ca3132db318c73e85995d969162eb1e329..ca14949f86d43645477b8f483457c6fcf4449151 100644 |
| --- a/core/fpdfdoc/include/cpdf_annot.h |
| +++ b/core/fpdfdoc/include/cpdf_annot.h |
| @@ -72,7 +72,7 @@ class CPDF_Annot { |
| const CFX_ByteString& sSubtype); |
| static CFX_ByteString AnnotSubtypeToString(CPDF_Annot::Subtype nSubtype); |
| - CPDF_Annot(CPDF_Dictionary* pDict, CPDF_Document* pDocument); |
| + CPDF_Annot(CPDF_Dictionary* pDict, CPDF_Document* pDocument, bool bToOwnDict); |
| ~CPDF_Annot(); |
| CPDF_Annot::Subtype GetSubtype() const; |
| @@ -101,7 +101,11 @@ class CPDF_Annot { |
| private: |
| void GenerateAPIfNeeded(); |
| - CPDF_Dictionary* const m_pAnnotDict; |
| + // For regular annotations, |m_pAnnotDict| is not owned. For |
| + // our artificaially created popup annotations, |m_pAnnotDict| |
|
Lei Zhang
2016/09/01 03:53:12
typo
Wei Li
2016/09/01 19:08:34
Done.
|
| + // is owned by this class. |
| + bool m_bOwnedAnnotDict; |
| + CPDF_Dictionary* m_pAnnotDict; |
| CPDF_Document* const m_pDocument; |
| CPDF_Annot::Subtype m_nSubtype; |
| std::map<CPDF_Stream*, std::unique_ptr<CPDF_Form>> m_APMap; |