Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1540)

Unified Diff: core/fpdfapi/parser/cpdf_indirect_object_holder.h

Issue 2424533003: Revert "Update CPDF_IndirectObjectHolder APIs for unique objects." (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/parser/cpdf_document.cpp ('k') | core/fpdfapi/parser/cpdf_indirect_object_holder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/parser/cpdf_indirect_object_holder.h
diff --git a/core/fpdfapi/parser/cpdf_indirect_object_holder.h b/core/fpdfapi/parser/cpdf_indirect_object_holder.h
index 074e428d4350d92e815a7f61c4b5b458dcbbd1d4..da4e942b5da73ca92fca89725e773febeebd827f 100644
--- a/core/fpdfapi/parser/cpdf_indirect_object_holder.h
+++ b/core/fpdfapi/parser/cpdf_indirect_object_holder.h
@@ -10,14 +10,9 @@
#include <map>
#include <memory>
-#include "core/fpdfapi/parser/cpdf_object.h"
-#include "core/fxcrt/cfx_string_pool_template.h"
-#include "core/fxcrt/cfx_weak_ptr.h"
#include "core/fxcrt/fx_system.h"
-class CPDF_Array;
-class CPDF_Dictionary;
-class CPDF_Stream;
+class CPDF_Object;
class CPDF_IndirectObjectHolder {
public:
@@ -29,23 +24,12 @@ class CPDF_IndirectObjectHolder {
CPDF_Object* GetIndirectObject(uint32_t objnum) const;
CPDF_Object* GetOrParseIndirectObject(uint32_t objnum);
- void DeleteIndirectObject(uint32_t objnum);
-
- // Take ownership of |pObj|, returns unowned pointer to it.
- CPDF_Object* AddIndirectObject(UniqueObject pObj);
-
- // Adds and owns a new object, returns unowned pointer to it.
- CPDF_Array* AddIndirectArray();
- CPDF_Dictionary* AddIndirectDictionary();
- CPDF_Dictionary* AddIndirectDictionary(
- const CFX_WeakPtr<CFX_ByteStringPool>& pPool);
- CPDF_Stream* AddIndirectStream();
- CPDF_Stream* AddIndirectStream(uint8_t* pData,
- uint32_t size,
- CPDF_Dictionary* pDict);
+ void ReleaseIndirectObject(uint32_t objnum);
+ // Take ownership of |pObj|.
+ uint32_t AddIndirectObject(CPDF_Object* pObj);
bool ReplaceIndirectObjectIfHigherGeneration(uint32_t objnum,
- UniqueObject pObj);
+ CPDF_Object* pObj);
uint32_t GetLastObjNum() const { return m_LastObjNum; }
void SetLastObjNum(uint32_t objnum) { m_LastObjNum = objnum; }
@@ -58,8 +42,6 @@ class CPDF_IndirectObjectHolder {
private:
uint32_t m_LastObjNum;
-
- // Ordinary deleter, not Release().
std::map<uint32_t, std::unique_ptr<CPDF_Object>> m_IndirectObjs;
};
« no previous file with comments | « core/fpdfapi/parser/cpdf_document.cpp ('k') | core/fpdfapi/parser/cpdf_indirect_object_holder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698