| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // Create an empty document, and its form fill environment. Returns true | 82 // Create an empty document, and its form fill environment. Returns true |
| 83 // on success or false on failure. | 83 // on success or false on failure. |
| 84 virtual bool CreateEmptyDocument(); | 84 virtual bool CreateEmptyDocument(); |
| 85 | 85 |
| 86 // Open the document specified by |filename|, and create its form fill | 86 // Open the document specified by |filename|, and create its form fill |
| 87 // environment, or return false on failure. | 87 // environment, or return false on failure. |
| 88 // The filename is relative to the test data directory where we store all the | 88 // The filename is relative to the test data directory where we store all the |
| 89 // test files. | 89 // test files. |
| 90 virtual bool OpenDocument(const std::string& filename, | 90 virtual bool OpenDocument(const std::string& filename, |
| 91 const char* password = nullptr, |
| 91 bool must_linearize = false); | 92 bool must_linearize = false); |
| 92 | 93 |
| 93 // Perform JavaScript actions that are to run at document open time. | 94 // Perform JavaScript actions that are to run at document open time. |
| 94 virtual void DoOpenActions(); | 95 virtual void DoOpenActions(); |
| 95 | 96 |
| 96 // Determine the page numbers present in the document. | 97 // Determine the page numbers present in the document. |
| 97 virtual int GetFirstPageNum(); | 98 virtual int GetFirstPageNum(); |
| 98 virtual int GetPageCount(); | 99 virtual int GetPageCount(); |
| 99 | 100 |
| 100 // Load a specific page of the open document. | 101 // Load a specific page of the open document. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, | 143 static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, |
| 143 int msecs, | 144 int msecs, |
| 144 TimerCallback fn); | 145 TimerCallback fn); |
| 145 static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); | 146 static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); |
| 146 static FPDF_PAGE GetPageTrampoline(FPDF_FORMFILLINFO* info, | 147 static FPDF_PAGE GetPageTrampoline(FPDF_FORMFILLINFO* info, |
| 147 FPDF_DOCUMENT document, | 148 FPDF_DOCUMENT document, |
| 148 int page_index); | 149 int page_index); |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 #endif // TESTING_EMBEDDER_TEST_H_ | 152 #endif // TESTING_EMBEDDER_TEST_H_ |
| OLD | NEW |