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