Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: testing/embedder_test.h

Issue 891763003: Merge to XFA: track formhandles in embeddder test class itself (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdfview_embeddertest.cpp ('k') | testing/embedder_test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/embedder_test.h
diff --git a/testing/embedder_test.h b/testing/embedder_test.h
index 3eb3be606f490fb7c299e55970b05c43abc4ed61..072dce3bc3f2e508af441542593d7f065e080aa1 100644
--- a/testing/embedder_test.h
+++ b/testing/embedder_test.h
@@ -22,6 +22,7 @@ class EmbedderTest : public ::testing::Test {
public:
EmbedderTest() :
document_(nullptr),
+ form_handle_(nullptr),
avail_(nullptr),
loader_(nullptr),
file_length_(0),
@@ -37,36 +38,32 @@ class EmbedderTest : public ::testing::Test {
void TearDown() override;
FPDF_DOCUMENT document() { return document_; }
+ FPDF_FORMHANDLE form_handle() { return form_handle_; }
- // Open the document specified by |filename|, or return false on failure.
+ // Open the document specified by |filename|, and create its form fill
+ // environment, or return false on failure.
virtual bool OpenDocument(const std::string& filename);
- // Create and return a handle to the form fill module for use with the
- // FORM_ family of functions from fpdfformfill.h, or return NULL on failure.
- virtual FPDF_FORMHANDLE SetFormFillEnvironment();
-
- // Release the resources obtained from SetFormFillEnvironment().
- virtual void ClearFormFillEnvironment(FPDF_FORMHANDLE form);
-
// Perform JavaScript actions that are to run at document open time.
- virtual void DoOpenActions(FPDF_FORMHANDLE form);
+ virtual void DoOpenActions();
// Determine the page numbers present in the document.
virtual int GetFirstPageNum();
virtual int GetPageCount();
// Load a specific page of the open document.
- virtual FPDF_PAGE LoadPage(int page_number, FPDF_FORMHANDLE form);
+ virtual FPDF_PAGE LoadPage(int page_number);
// Convert a loaded page into a bitmap.
- virtual FPDF_BITMAP RenderPage(FPDF_PAGE page, FPDF_FORMHANDLE form);
+ virtual FPDF_BITMAP RenderPage(FPDF_PAGE page);
// Relese the resources obtained from LoadPage(). Further use of |page|
// is prohibited after this call is made.
- virtual void UnloadPage(FPDF_PAGE page, FPDF_FORMHANDLE form);
+ virtual void UnloadPage(FPDF_PAGE page);
protected:
FPDF_DOCUMENT document_;
+ FPDF_FORMHANDLE form_handle_;
FPDF_AVAIL avail_;
FX_DOWNLOADHINTS hints_;
FPDF_FILEACCESS file_access_;
« no previous file with comments | « fpdfsdk/src/fpdfview_embeddertest.cpp ('k') | testing/embedder_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698