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

Side by Side Diff: testing/embedder_test.h

Issue 1353093003: Support linearized loading (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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
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 bool must_linearize = false);
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698