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

Unified Diff: pdf/pdfium/pdfium_page.h

Issue 784403004: Do not unload pages while loading of the same pages is in progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | pdf/pdfium/pdfium_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_page.h
diff --git a/pdf/pdfium/pdfium_page.h b/pdf/pdfium/pdfium_page.h
index 22ea142988b3697ea3ed30f111e708238c2e0b49..de4317ec9ab0e2ee7075e6fa98ad1e68071cb54f 100644
--- a/pdf/pdfium/pdfium_page.h
+++ b/pdf/pdfium/pdfium_page.h
@@ -34,9 +34,9 @@ class PDFiumPage {
void Unload();
// Gets the FPDF_PAGE for this page, loading and parsing it if necessary.
FPDF_PAGE GetPage();
- //Get the FPDF_PAGE for printing.
+ // Get the FPDF_PAGE for printing.
FPDF_PAGE GetPrintPage();
- //Close the printing page.
+ // Close the printing page.
void ClosePrintPage();
// Returns FPDF_TEXTPAGE for the page, loading and parsing it if necessary.
@@ -112,6 +112,15 @@ class PDFiumPage {
base::Value* CreateTextNode(std::string text);
base::Value* CreateURLNode(std::string text, std::string url);
+ class ScopedLoadCounter {
+ public:
+ explicit ScopedLoadCounter(PDFiumPage* page);
+ ~ScopedLoadCounter();
+
+ private:
+ PDFiumPage* const page_;
+ };
+
struct Link {
Link();
~Link();
@@ -125,6 +134,7 @@ class PDFiumPage {
FPDF_PAGE page_;
FPDF_TEXTPAGE text_page_;
int index_;
+ int loading_count_;
pp::Rect rect_;
bool calculated_links_;
std::vector<Link> links_;
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698