OLD | NEW |
1 // Copyright 2015 PDFium Authors. All rights reserved. | 1 // Copyright 2015 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TESTING_EMBEDDER_TEST_H_ | 5 #ifndef TESTING_EMBEDDER_TEST_H_ |
6 #define TESTING_EMBEDDER_TEST_H_ | 6 #define TESTING_EMBEDDER_TEST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 FPDF_FILEACCESS file_access_; | 117 FPDF_FILEACCESS file_access_; |
118 FX_FILEAVAIL file_avail_; | 118 FX_FILEAVAIL file_avail_; |
119 #ifdef PDF_ENABLE_V8 | 119 #ifdef PDF_ENABLE_V8 |
120 v8::Platform* platform_; | 120 v8::Platform* platform_; |
121 #endif // PDF_ENABLE_V8 | 121 #endif // PDF_ENABLE_V8 |
122 void* external_isolate_; | 122 void* external_isolate_; |
123 TestLoader* loader_; | 123 TestLoader* loader_; |
124 size_t file_length_; | 124 size_t file_length_; |
125 std::unique_ptr<char, pdfium::FreeDeleter> file_contents_; | 125 std::unique_ptr<char, pdfium::FreeDeleter> file_contents_; |
126 std::map<int, FPDF_PAGE> page_map_; | 126 std::map<int, FPDF_PAGE> page_map_; |
| 127 std::map<FPDF_PAGE, int> page_reverse_map_; |
127 | 128 |
128 private: | 129 private: |
129 static void UnsupportedHandlerTrampoline(UNSUPPORT_INFO*, int type); | 130 static void UnsupportedHandlerTrampoline(UNSUPPORT_INFO*, int type); |
130 static int AlertTrampoline(IPDF_JSPLATFORM* plaform, | 131 static int AlertTrampoline(IPDF_JSPLATFORM* plaform, |
131 FPDF_WIDESTRING message, | 132 FPDF_WIDESTRING message, |
132 FPDF_WIDESTRING title, | 133 FPDF_WIDESTRING title, |
133 int type, | 134 int type, |
134 int icon); | 135 int icon); |
135 static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, | 136 static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, |
136 int msecs, | 137 int msecs, |
137 TimerCallback fn); | 138 TimerCallback fn); |
138 static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); | 139 static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); |
139 static FPDF_PAGE GetPageTrampoline(FPDF_FORMFILLINFO* info, | 140 static FPDF_PAGE GetPageTrampoline(FPDF_FORMFILLINFO* info, |
140 FPDF_DOCUMENT document, | 141 FPDF_DOCUMENT document, |
141 int page_index); | 142 int page_index); |
142 }; | 143 }; |
143 | 144 |
144 #endif // TESTING_EMBEDDER_TEST_H_ | 145 #endif // TESTING_EMBEDDER_TEST_H_ |
OLD | NEW |