| Index: pdf/pdfium/pdfium_engine.h
|
| diff --git a/pdf/pdfium/pdfium_engine.h b/pdf/pdfium/pdfium_engine.h
|
| index e6392b4a482d433e56dbab35b45a9b770f5c6f8e..ed73bef9282a0aee8b558fe33b0791e22e6916a7 100644
|
| --- a/pdf/pdfium/pdfium_engine.h
|
| +++ b/pdf/pdfium/pdfium_engine.h
|
| @@ -15,6 +15,7 @@
|
| #include <vector>
|
|
|
| #include "base/macros.h"
|
| +#include "base/optional.h"
|
| #include "base/time/time.h"
|
| #include "pdf/document_loader.h"
|
| #include "pdf/pdf_engine.h"
|
| @@ -248,6 +249,11 @@ class PDFiumEngine : public PDFEngine,
|
| // must have been called first.
|
| bool IsPageVisible(int index) const;
|
|
|
| + // Internal interface that caches the page index requested by the PDFium
|
| + // engine
|
| + // to be used during the interval the client has not finished handling it.
|
| + void ScrollToPage(int page);
|
| +
|
| // Checks if a page is now available, and if so marks it as such and returns
|
| // true. Otherwise, it will return false and will add the index to the given
|
| // array if it's not already there.
|
| @@ -677,6 +683,10 @@ class PDFiumEngine : public PDFEngine,
|
| // CalculateVisiblePages()
|
| int most_visible_page_;
|
|
|
| + // Holds the page index requested by PDFium while there are in-flight
|
| + // messages being sent by the Browser <-> PDFium engine.
|
| + base::Optional<int> in_flight_visible_page_;
|
| +
|
| // Set to true after FORM_DoDocumentJSAction/FORM_DoDocumentOpenAction have
|
| // been called. Only after that can we call FORM_DoPageAAction.
|
| bool called_do_document_action_;
|
|
|