OLD | NEW |
1 // Copyright (c) 2015 PDFium Authors. All rights reserved. | 1 // Copyright (c) 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 <string> | 9 #include <string> |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 void SetDelegate(Delegate* delegate) { | 74 void SetDelegate(Delegate* delegate) { |
75 delegate_ = delegate ? delegate : default_delegate_.get(); | 75 delegate_ = delegate ? delegate : default_delegate_.get(); |
76 } | 76 } |
77 | 77 |
78 FPDF_DOCUMENT document() { return document_; } | 78 FPDF_DOCUMENT document() { return document_; } |
79 FPDF_FORMHANDLE form_handle() { return form_handle_; } | 79 FPDF_FORMHANDLE form_handle() { return form_handle_; } |
80 | 80 |
81 // Open the document specified by |filename|, and create its form fill | 81 // Open the document specified by |filename|, and create its form fill |
82 // environment, or return false on failure. | 82 // environment, or return false on failure. |
| 83 // The filename is relative to the test data directory where we store all the |
| 84 // test files. |
83 virtual bool OpenDocument(const std::string& filename, | 85 virtual bool OpenDocument(const std::string& filename, |
84 bool must_linearize = false); | 86 bool must_linearize = false); |
85 | 87 |
86 // Perform JavaScript actions that are to run at document open time. | 88 // Perform JavaScript actions that are to run at document open time. |
87 virtual void DoOpenActions(); | 89 virtual void DoOpenActions(); |
88 | 90 |
89 // Determine the page numbers present in the document. | 91 // Determine the page numbers present in the document. |
90 virtual int GetFirstPageNum(); | 92 virtual int GetFirstPageNum(); |
91 virtual int GetPageCount(); | 93 virtual int GetPageCount(); |
92 | 94 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, | 135 static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, |
134 int msecs, | 136 int msecs, |
135 TimerCallback fn); | 137 TimerCallback fn); |
136 static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); | 138 static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); |
137 static FPDF_PAGE GetPageTrampoline(FPDF_FORMFILLINFO* info, | 139 static FPDF_PAGE GetPageTrampoline(FPDF_FORMFILLINFO* info, |
138 FPDF_DOCUMENT document, | 140 FPDF_DOCUMENT document, |
139 int page_index); | 141 int page_index); |
140 }; | 142 }; |
141 | 143 |
142 #endif // TESTING_EMBEDDER_TEST_H_ | 144 #endif // TESTING_EMBEDDER_TEST_H_ |
OLD | NEW |