summaryrefslogtreecommitdiff
path: root/core/fxcodec/include/JBig2_DocumentContext.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-07-24 08:26:49 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-24 08:26:50 -0700
commit0024a22b4a793630a1a8e8d85c4525c7b82a3ed7 (patch)
tree09cc3dc3ff26e231a82787c602834cdf2da26fb0 /core/fxcodec/include/JBig2_DocumentContext.h
parent9f515bcccb40e8ae251bbe8afc1ef6c4db1f05a8 (diff)
downloadpdfium-0024a22b4a793630a1a8e8d85c4525c7b82a3ed7.tar.xz
Remove CFX_Deletable
Change the last use of CFX_Deletable to its actual type and remove the use of CFX_Deletable. Review-Url: https://codereview.chromium.org/2178613002
Diffstat (limited to 'core/fxcodec/include/JBig2_DocumentContext.h')
-rw-r--r--core/fxcodec/include/JBig2_DocumentContext.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/core/fxcodec/include/JBig2_DocumentContext.h b/core/fxcodec/include/JBig2_DocumentContext.h
new file mode 100644
index 0000000000..d49bdfab8e
--- /dev/null
+++ b/core/fxcodec/include/JBig2_DocumentContext.h
@@ -0,0 +1,34 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_FXCODEC_INCLUDE_JBIG2_DOCUMENTCONTEXT_H_
+#define CORE_FXCODEC_INCLUDE_JBIG2_DOCUMENTCONTEXT_H_
+
+#include <list>
+#include <memory>
+#include <utility>
+
+class CJBig2_SymbolDict;
+
+using CJBig2_CacheKey = std::pair<uint32_t, uint32_t>;
+using CJBig2_CachePair =
+ std::pair<CJBig2_CacheKey, std::unique_ptr<CJBig2_SymbolDict>>;
+
+// Holds per-document JBig2 related data.
+class JBig2_DocumentContext {
+ public:
+ JBig2_DocumentContext();
+ ~JBig2_DocumentContext();
+
+ std::list<CJBig2_CachePair>* GetSymbolDictCache() {
+ return &m_SymbolDictCache;
+ }
+
+ private:
+ std::list<CJBig2_CachePair> m_SymbolDictCache;
+};
+
+#endif // CORE_FXCODEC_INCLUDE_JBIG2_DOCUMENTCONTEXT_H_