summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_structtree.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-23 16:18:28 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 01:28:39 +0000
commit033e565d8244953afe8eab3d0c7ee1ed9863c921 (patch)
tree410cbe152379180ff2fd3411b289be6fa31e3c82 /core/fpdfdoc/cpdf_structtree.h
parent655c783b8077f18e17418a3aab9b5a07c8055049 (diff)
downloadpdfium-033e565d8244953afe8eab3d0c7ee1ed9863c921.tar.xz
Convert to CFX_UnownedPtr, part 5
Change-Id: Ibdb20fca7e4daae9d61286df4801ac02faf3b281 Reviewed-on: https://pdfium-review.googlesource.com/5831 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_structtree.h')
-rw-r--r--core/fpdfdoc/cpdf_structtree.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/fpdfdoc/cpdf_structtree.h b/core/fpdfdoc/cpdf_structtree.h
index aa30f802db..037512acfc 100644
--- a/core/fpdfdoc/cpdf_structtree.h
+++ b/core/fpdfdoc/cpdf_structtree.h
@@ -12,6 +12,7 @@
#include <vector>
#include "core/fxcrt/cfx_retain_ptr.h"
+#include "core/fxcrt/cfx_unowned_ptr.h"
class CPDF_Dictionary;
class CPDF_Document;
@@ -28,9 +29,9 @@ class CPDF_StructTree {
int CountTopElements() const;
CPDF_StructElement* GetTopElement(int i) const;
- const CPDF_Dictionary* GetRoleMap() const { return m_pRoleMap; }
- const CPDF_Dictionary* GetPage() const { return m_pPage; }
- const CPDF_Dictionary* GetTreeRoot() const { return m_pTreeRoot; }
+ const CPDF_Dictionary* GetRoleMap() const { return m_pRoleMap.Get(); }
+ const CPDF_Dictionary* GetPage() const { return m_pPage.Get(); }
+ const CPDF_Dictionary* GetTreeRoot() const { return m_pTreeRoot.Get(); }
private:
void LoadPageTree(const CPDF_Dictionary* pPageDict);
@@ -41,9 +42,9 @@ class CPDF_StructTree {
bool AddTopLevelNode(CPDF_Dictionary* pDict,
const CFX_RetainPtr<CPDF_StructElement>& pElement);
- const CPDF_Dictionary* const m_pTreeRoot;
- const CPDF_Dictionary* const m_pRoleMap;
- const CPDF_Dictionary* m_pPage;
+ CFX_UnownedPtr<const CPDF_Dictionary> const m_pTreeRoot;
+ CFX_UnownedPtr<const CPDF_Dictionary> const m_pRoleMap;
+ CFX_UnownedPtr<const CPDF_Dictionary> m_pPage;
std::vector<CFX_RetainPtr<CPDF_StructElement>> m_Kids;
};