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 | 86 |
85 // Perform JavaScript actions that are to run at document open time. | 87 // Perform JavaScript actions that are to run at document open time. |
86 virtual void DoOpenActions(); | 88 virtual void DoOpenActions(); |
87 | 89 |
88 // Determine the page numbers present in the document. | 90 // Determine the page numbers present in the document. |
89 virtual int GetFirstPageNum(); | 91 virtual int GetFirstPageNum(); |
90 virtual int GetPageCount(); | 92 virtual int GetPageCount(); |
91 | 93 |
92 // Load a specific page of the open document. | 94 // Load a specific page of the open document. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, | 134 static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, |
133 int msecs, | 135 int msecs, |
134 TimerCallback fn); | 136 TimerCallback fn); |
135 static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); | 137 static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); |
136 static FPDF_PAGE GetPageTrampoline(FPDF_FORMFILLINFO* info, | 138 static FPDF_PAGE GetPageTrampoline(FPDF_FORMFILLINFO* info, |
137 FPDF_DOCUMENT document, | 139 FPDF_DOCUMENT document, |
138 int page_index); | 140 int page_index); |
139 }; | 141 }; |
140 | 142 |
141 #endif // TESTING_EMBEDDER_TEST_H_ | 143 #endif // TESTING_EMBEDDER_TEST_H_ |
OLD | NEW |