| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "pdf/document_loader.h" | 15 #include "pdf/document_loader.h" |
| 16 #include "pdf/pdf_engine.h" | 16 #include "pdf/pdf_engine.h" |
| 17 #include "pdf/pdfium/pdfium_page.h" | 17 #include "pdf/pdfium/pdfium_page.h" |
| 18 #include "pdf/pdfium/pdfium_range.h" | 18 #include "pdf/pdfium/pdfium_range.h" |
| 19 #include "ppapi/cpp/completion_callback.h" | 19 #include "ppapi/cpp/completion_callback.h" |
| 20 #include "ppapi/cpp/dev/buffer_dev.h" | 20 #include "ppapi/cpp/dev/buffer_dev.h" |
| 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 "ppapi/cpp/var_array.h" |
| 23 #include "third_party/pdfium/fpdfsdk/include/fpdf_dataavail.h" | 24 #include "third_party/pdfium/fpdfsdk/include/fpdf_dataavail.h" |
| 24 #include "third_party/pdfium/fpdfsdk/include/fpdf_progressive.h" | 25 #include "third_party/pdfium/fpdfsdk/include/fpdf_progressive.h" |
| 25 #include "third_party/pdfium/fpdfsdk/include/fpdfformfill.h" | 26 #include "third_party/pdfium/fpdfsdk/include/fpdfformfill.h" |
| 26 #include "third_party/pdfium/fpdfsdk/include/fpdfview.h" | 27 #include "third_party/pdfium/fpdfsdk/include/fpdfview.h" |
| 27 | 28 |
| 28 namespace pp { | 29 namespace pp { |
| 29 class KeyboardInputEvent; | 30 class KeyboardInputEvent; |
| 30 class MouseInputEvent; | 31 class MouseInputEvent; |
| 31 } | 32 } |
| 32 | 33 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 virtual void StopFind(); | 72 virtual void StopFind(); |
| 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(); |
| 82 virtual pp::VarArray GetBookmarks(); |
| 81 virtual int GetNamedDestinationPage(const std::string& destination); | 83 virtual int GetNamedDestinationPage(const std::string& destination); |
| 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); |
| (...skipping 650 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 |