summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_bookmark.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-23 17:10:46 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 00:49:21 +0000
commit655c783b8077f18e17418a3aab9b5a07c8055049 (patch)
treee121b850ead5af67156b126c2e8d2fdcfa4be6a9 /core/fpdfdoc/cpdf_bookmark.h
parent6f3593c5cdf62915fc086448312671ce1fce5291 (diff)
downloadpdfium-655c783b8077f18e17418a3aab9b5a07c8055049.tar.xz
Convert to CFX_UnownedPtr, part 3.
Remove an explicit clear to re-order the member destruction order. Change-Id: I33da3f3de4b8e8e0cfbdceaf5140e98f5d6f904a Reviewed-on: https://pdfium-review.googlesource.com/5791 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_bookmark.h')
-rw-r--r--core/fpdfdoc/cpdf_bookmark.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/fpdfdoc/cpdf_bookmark.h b/core/fpdfdoc/cpdf_bookmark.h
index 30a8a512cc..b9a1ac650e 100644
--- a/core/fpdfdoc/cpdf_bookmark.h
+++ b/core/fpdfdoc/cpdf_bookmark.h
@@ -9,6 +9,7 @@
#include "core/fpdfdoc/cpdf_action.h"
#include "core/fpdfdoc/cpdf_dest.h"
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_string.h"
class CPDF_Dictionary;
@@ -16,10 +17,12 @@ class CPDF_Document;
class CPDF_Bookmark {
public:
- CPDF_Bookmark() : m_pDict(nullptr) {}
- explicit CPDF_Bookmark(CPDF_Dictionary* pDict) : m_pDict(pDict) {}
+ CPDF_Bookmark();
+ CPDF_Bookmark(const CPDF_Bookmark& that);
+ explicit CPDF_Bookmark(CPDF_Dictionary* pDict);
+ ~CPDF_Bookmark();
- CPDF_Dictionary* GetDict() const { return m_pDict; }
+ CPDF_Dictionary* GetDict() const { return m_pDict.Get(); }
uint32_t GetColorRef() const;
uint32_t GetFontStyle() const;
CFX_WideString GetTitle() const;
@@ -27,7 +30,7 @@ class CPDF_Bookmark {
CPDF_Action GetAction() const;
private:
- CPDF_Dictionary* m_pDict;
+ CFX_UnownedPtr<CPDF_Dictionary> m_pDict;
};
#endif // CORE_FPDFDOC_CPDF_BOOKMARK_H_