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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 virtual pp::Rect GetPageRect(int index); | 87 virtual pp::Rect GetPageRect(int index); |
88 virtual pp::Rect GetPageContentsRect(int index); | 88 virtual pp::Rect GetPageContentsRect(int index); |
89 virtual int GetVerticalScrollbarYPosition() { return position_.y(); } | 89 virtual int GetVerticalScrollbarYPosition() { return position_.y(); } |
90 virtual void PaintThumbnail(pp::ImageData* image_data, int index); | 90 virtual void PaintThumbnail(pp::ImageData* image_data, int index); |
91 virtual void SetGrayscale(bool grayscale); | 91 virtual void SetGrayscale(bool grayscale); |
92 virtual void OnCallback(int id); | 92 virtual void OnCallback(int id); |
93 virtual std::string GetPageAsJSON(int index); | 93 virtual std::string GetPageAsJSON(int index); |
94 virtual bool GetPrintScaling(); | 94 virtual bool GetPrintScaling(); |
95 virtual int GetCopiesToPrint(); | 95 virtual int GetCopiesToPrint(); |
96 virtual int GetDuplexType(); | 96 virtual int GetDuplexType(); |
| 97 virtual bool GetPageSizeAndUniformity(pp::Size* size); |
97 virtual void AppendBlankPages(int num_pages); | 98 virtual void AppendBlankPages(int num_pages); |
98 virtual void AppendPage(PDFEngine* engine, int index); | 99 virtual void AppendPage(PDFEngine* engine, int index); |
99 virtual pp::Point GetScrollPosition(); | 100 virtual pp::Point GetScrollPosition(); |
100 virtual void SetScrollPosition(const pp::Point& position); | 101 virtual void SetScrollPosition(const pp::Point& position); |
101 virtual bool IsProgressiveLoad(); | 102 virtual bool IsProgressiveLoad(); |
102 | 103 |
103 // DocumentLoader::Client implementation. | 104 // DocumentLoader::Client implementation. |
104 virtual pp::Instance* GetPluginInstance(); | 105 virtual pp::Instance* GetPluginInstance(); |
105 virtual pp::URLLoader CreateURLLoader(); | 106 virtual pp::URLLoader CreateURLLoader(); |
106 virtual void OnPartialDocumentLoaded(); | 107 virtual void OnPartialDocumentLoaded(); |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 | 753 |
753 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 754 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
754 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 755 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
755 int pdf_buffer_size, int page_number, | 756 int pdf_buffer_size, int page_number, |
756 double* width, double* height); | 757 double* width, double* height); |
757 }; | 758 }; |
758 | 759 |
759 } // namespace chrome_pdf | 760 } // namespace chrome_pdf |
760 | 761 |
761 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ | 762 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ |
OLD | NEW |