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

Unified Diff: fpdfsdk/src/javascript/Document.h

Issue 1560333002: Merge to XFA: Replace IconTree class with std::list. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 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 | « no previous file | fpdfsdk/src/javascript/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/Document.h
diff --git a/fpdfsdk/src/javascript/Document.h b/fpdfsdk/src/javascript/Document.h
index 3e957a6057bca5fb1bb5c6edba6ba8daa030aab6..350ab056821d028985799d2cd80f364fe1f78b04 100644
--- a/fpdfsdk/src/javascript/Document.h
+++ b/fpdfsdk/src/javascript/Document.h
@@ -7,6 +7,9 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_DOCUMENT_H_
#define FPDFSDK_SRC_JAVASCRIPT_DOCUMENT_H_
+#include <list>
+#include <memory>
+
#include "JS_Define.h"
class PrintParamsObj : public CJS_EmbedObj {
@@ -37,31 +40,13 @@ class Icon;
class Field;
struct IconElement {
- IconElement() : IconName(L""), NextIcon(NULL), IconStream(NULL) {}
- virtual ~IconElement() {}
+ IconElement(const CFX_WideString& name, Icon* stream)
+ : IconName(name), IconStream(stream) {}
+
CFX_WideString IconName;
- IconElement* NextIcon;
Icon* IconStream;
};
-class IconTree {
- public:
- IconTree() : m_pHead(NULL), m_pEnd(NULL), m_iLength(0) {}
-
- virtual ~IconTree() {}
-
- public:
- void InsertIconElement(IconElement* pNewIcon);
- void DeleteIconTree();
- int GetLength();
- IconElement* operator[](int iIndex);
-
- private:
- IconElement* m_pHead;
- IconElement* m_pEnd;
- int m_iLength;
-};
-
struct CJS_DelayData;
struct CJS_DelayAnnot;
struct CJS_AnnotObj;
@@ -295,7 +280,7 @@ class Document : public CJS_EmbedObj {
CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex);
v8::Isolate* m_isolate;
- IconTree* m_pIconTree;
+ std::list<std::unique_ptr<IconElement>> m_IconList;
CPDFSDK_Document* m_pDocument;
CFX_WideString m_cwBaseURL;
bool m_bDelay;
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698