| 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 10 matching lines...) Expand all Loading... |
| 21 #include "ppapi/cpp/image_data.h" | 21 #include "ppapi/cpp/image_data.h" |
| 22 #include "ppapi/cpp/point.h" | 22 #include "ppapi/cpp/point.h" |
| 23 #include "third_party/pdfium/fpdfsdk/include/fpdf_dataavail.h" | 23 #include "third_party/pdfium/fpdfsdk/include/fpdf_dataavail.h" |
| 24 #include "third_party/pdfium/fpdfsdk/include/fpdf_progressive.h" | 24 #include "third_party/pdfium/fpdfsdk/include/fpdf_progressive.h" |
| 25 #include "third_party/pdfium/fpdfsdk/include/fpdfformfill.h" | 25 #include "third_party/pdfium/fpdfsdk/include/fpdfformfill.h" |
| 26 #include "third_party/pdfium/fpdfsdk/include/fpdfview.h" | 26 #include "third_party/pdfium/fpdfsdk/include/fpdfview.h" |
| 27 | 27 |
| 28 namespace pp { | 28 namespace pp { |
| 29 class KeyboardInputEvent; | 29 class KeyboardInputEvent; |
| 30 class MouseInputEvent; | 30 class MouseInputEvent; |
| 31 class VarDictionary; |
| 31 } | 32 } |
| 32 | 33 |
| 33 namespace chrome_pdf { | 34 namespace chrome_pdf { |
| 34 | 35 |
| 35 class ShadowMatrix; | 36 class ShadowMatrix; |
| 36 | 37 |
| 37 class PDFiumEngine : public PDFEngine, | 38 class PDFiumEngine : public PDFEngine, |
| 38 public DocumentLoader::Client, | 39 public DocumentLoader::Client, |
| 39 public FPDF_FORMFILLINFO, | 40 public FPDF_FORMFILLINFO, |
| 40 public IPDF_JSPLATFORM, | 41 public IPDF_JSPLATFORM, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 virtual void ZoomUpdated(double new_zoom_level); | 73 virtual void ZoomUpdated(double new_zoom_level); |
| 73 virtual void RotateClockwise(); | 74 virtual void RotateClockwise(); |
| 74 virtual void RotateCounterclockwise(); | 75 virtual void RotateCounterclockwise(); |
| 75 virtual std::string GetSelectedText(); | 76 virtual std::string GetSelectedText(); |
| 76 virtual std::string GetLinkAtPosition(const pp::Point& point); | 77 virtual std::string GetLinkAtPosition(const pp::Point& point); |
| 77 virtual bool IsSelecting(); | 78 virtual bool IsSelecting(); |
| 78 virtual bool HasPermission(DocumentPermission permission) const; | 79 virtual bool HasPermission(DocumentPermission permission) const; |
| 79 virtual void SelectAll(); | 80 virtual void SelectAll(); |
| 80 virtual int GetNumberOfPages(); | 81 virtual int GetNumberOfPages(); |
| 81 virtual int GetNamedDestinationPage(const std::string& destination); | 82 virtual int GetNamedDestinationPage(const std::string& destination); |
| 83 virtual pp::VarDictionary GetNamedDestinations(); |
| 82 virtual int GetFirstVisiblePage(); | 84 virtual int GetFirstVisiblePage(); |
| 83 virtual int GetMostVisiblePage(); | 85 virtual int GetMostVisiblePage(); |
| 84 virtual pp::Rect GetPageRect(int index); | 86 virtual pp::Rect GetPageRect(int index); |
| 85 virtual pp::Rect GetPageContentsRect(int index); | 87 virtual pp::Rect GetPageContentsRect(int index); |
| 86 virtual int GetVerticalScrollbarYPosition() { return position_.y(); } | 88 virtual int GetVerticalScrollbarYPosition() { return position_.y(); } |
| 87 virtual void PaintThumbnail(pp::ImageData* image_data, int index); | 89 virtual void PaintThumbnail(pp::ImageData* image_data, int index); |
| 88 virtual void SetGrayscale(bool grayscale); | 90 virtual void SetGrayscale(bool grayscale); |
| 89 virtual void OnCallback(int id); | 91 virtual void OnCallback(int id); |
| 90 virtual std::string GetPageAsJSON(int index); | 92 virtual std::string GetPageAsJSON(int index); |
| 91 virtual bool GetPrintScaling(); | 93 virtual bool GetPrintScaling(); |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 | 743 |
| 742 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 744 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
| 743 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 745 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
| 744 int pdf_buffer_size, int page_number, | 746 int pdf_buffer_size, int page_number, |
| 745 double* width, double* height); | 747 double* width, double* height); |
| 746 }; | 748 }; |
| 747 | 749 |
| 748 } // namespace chrome_pdf | 750 } // namespace chrome_pdf |
| 749 | 751 |
| 750 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ | 752 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ |
| OLD | NEW |