Chromium Code Reviews| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 virtual bool IsProgressiveLoad(); | 98 virtual bool IsProgressiveLoad(); |
| 98 | 99 |
| 99 // DocumentLoader::Client implementation. | 100 // DocumentLoader::Client implementation. |
| 100 virtual pp::Instance* GetPluginInstance(); | 101 virtual pp::Instance* GetPluginInstance(); |
| 101 virtual pp::URLLoader CreateURLLoader(); | 102 virtual pp::URLLoader CreateURLLoader(); |
| 102 virtual void OnPartialDocumentLoaded(); | 103 virtual void OnPartialDocumentLoaded(); |
| 103 virtual void OnPendingRequestComplete(); | 104 virtual void OnPendingRequestComplete(); |
| 104 virtual void OnNewDataAvailable(); | 105 virtual void OnNewDataAvailable(); |
| 105 virtual void OnDocumentComplete(); | 106 virtual void OnDocumentComplete(); |
| 106 | 107 |
| 108 virtual inline unsigned long GetNameDestCount() { | |
| 109 return FPDF_CountNamedDests(doc_); | |
| 110 } | |
|
raymes
2015/01/14 00:19:01
We can remove this
Deepak
2015/01/14 06:29:01
Done.
| |
| 111 virtual pp::VarDictionary GetAllNamedDestinations(); | |
| 112 | |
| 107 void UnsupportedFeature(int type); | 113 void UnsupportedFeature(int type); |
| 108 | 114 |
| 109 std::string current_find_text() const { return current_find_text_; } | 115 std::string current_find_text() const { return current_find_text_; } |
| 110 | 116 |
| 111 FPDF_DOCUMENT doc() { return doc_; } | 117 FPDF_DOCUMENT doc() { return doc_; } |
| 112 FPDF_FORMHANDLE form() { return form_; } | 118 FPDF_FORMHANDLE form() { return form_; } |
| 113 | 119 |
| 114 private: | 120 private: |
| 115 // This helper class is used to detect the difference in selection between | 121 // This helper class is used to detect the difference in selection between |
| 116 // construction and destruction. At destruction, it invalidates all the | 122 // construction and destruction. At destruction, it invalidates all the |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 741 | 747 |
| 742 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 748 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
| 743 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 749 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
| 744 int pdf_buffer_size, int page_number, | 750 int pdf_buffer_size, int page_number, |
| 745 double* width, double* height); | 751 double* width, double* height); |
| 746 }; | 752 }; |
| 747 | 753 |
| 748 } // namespace chrome_pdf | 754 } // namespace chrome_pdf |
| 749 | 755 |
| 750 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ | 756 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ |
| OLD | NEW |