OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium 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 PDF_PDFIUM_PDFIUM_ENGINE_H_ | 5 #ifndef PDF_PDFIUM_PDFIUM_ENGINE_H_ |
6 #define PDF_PDFIUM_PDFIUM_ENGINE_H_ | 6 #define PDF_PDFIUM_PDFIUM_ENGINE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 // The current text used for searching. | 613 // The current text used for searching. |
614 std::string current_find_text_; | 614 std::string current_find_text_; |
615 | 615 |
616 // The PDFium wrapper object for the document. | 616 // The PDFium wrapper object for the document. |
617 FPDF_DOCUMENT doc_; | 617 FPDF_DOCUMENT doc_; |
618 | 618 |
619 // The PDFium wrapper for form data. Used even if there are no form controls | 619 // The PDFium wrapper for form data. Used even if there are no form controls |
620 // on the page. | 620 // on the page. |
621 FPDF_FORMHANDLE form_; | 621 FPDF_FORMHANDLE form_; |
622 | 622 |
623 // The page(s) of the document. Store a vector of pointers so that when the | 623 // The page(s) of the document. |
624 // vector is resized we don't close the pages that are used in pending | 624 std::vector<std::unique_ptr<PDFiumPage>> pages_; |
625 // paints. | |
626 std::vector<PDFiumPage*> pages_; | |
627 | 625 |
628 // The indexes of the pages currently visible. | 626 // The indexes of the pages currently visible. |
629 std::vector<int> visible_pages_; | 627 std::vector<int> visible_pages_; |
630 | 628 |
631 // The indexes of the pages pending download. | 629 // The indexes of the pages pending download. |
632 std::vector<int> pending_pages_; | 630 std::vector<int> pending_pages_; |
633 | 631 |
634 // During handling of input events we don't want to unload any pages in | 632 // During handling of input events we don't want to unload any pages in |
635 // callbacks to us from PDFium, since the current page can change while PDFium | 633 // callbacks to us from PDFium, since the current page can change while PDFium |
636 // code still has a pointer to it. | 634 // code still has a pointer to it. |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 788 bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
791 int pdf_buffer_size, | 789 int pdf_buffer_size, |
792 int page_number, | 790 int page_number, |
793 double* width, | 791 double* width, |
794 double* height) override; | 792 double* height) override; |
795 }; | 793 }; |
796 | 794 |
797 } // namespace chrome_pdf | 795 } // namespace chrome_pdf |
798 | 796 |
799 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ | 797 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ |
OLD | NEW |