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 virtual bool OpenDocument(const std::string& filename); | 83 virtual bool OpenDocument(const std::string& filename, |
84 const bool must_linearize); | |
Tom Sepez
2015/10/21 17:53:08
nit: const is pointless for bool arguments. Also m
jun_fang
2015/10/22 00:50:06
I will remove 'const' and add a default value of f
| |
84 | 85 |
85 // Perform JavaScript actions that are to run at document open time. | 86 // Perform JavaScript actions that are to run at document open time. |
86 virtual void DoOpenActions(); | 87 virtual void DoOpenActions(); |
87 | 88 |
88 // Determine the page numbers present in the document. | 89 // Determine the page numbers present in the document. |
89 virtual int GetFirstPageNum(); | 90 virtual int GetFirstPageNum(); |
90 virtual int GetPageCount(); | 91 virtual int GetPageCount(); |
91 | 92 |
92 // Load a specific page of the open document. | 93 // Load a specific page of the open document. |
93 virtual FPDF_PAGE LoadPage(int page_number); | 94 virtual FPDF_PAGE LoadPage(int page_number); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, | 133 static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, |
133 int msecs, | 134 int msecs, |
134 TimerCallback fn); | 135 TimerCallback fn); |
135 static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); | 136 static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); |
136 static FPDF_PAGE GetPageTrampoline(FPDF_FORMFILLINFO* info, | 137 static FPDF_PAGE GetPageTrampoline(FPDF_FORMFILLINFO* info, |
137 FPDF_DOCUMENT document, | 138 FPDF_DOCUMENT document, |
138 int page_index); | 139 int page_index); |
139 }; | 140 }; |
140 | 141 |
141 #endif // TESTING_EMBEDDER_TEST_H_ | 142 #endif // TESTING_EMBEDDER_TEST_H_ |
OLD | NEW |