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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 | 42 |
| 43 class PDFiumEngine : public PDFEngine, | 43 class PDFiumEngine : public PDFEngine, |
| 44 public DocumentLoader::Client, | 44 public DocumentLoader::Client, |
| 45 public FPDF_FORMFILLINFO, | 45 public FPDF_FORMFILLINFO, |
| 46 public IPDF_JSPLATFORM, | 46 public IPDF_JSPLATFORM, |
| 47 public IFSDK_PAUSE { | 47 public IFSDK_PAUSE { |
| 48 public: | 48 public: |
| 49 explicit PDFiumEngine(PDFEngine::Client* client); | 49 explicit PDFiumEngine(PDFEngine::Client* client); |
| 50 ~PDFiumEngine() override; | 50 ~PDFiumEngine() override; |
| 51 | 51 |
| 52 enum NavigateOption { | |
|
dsinclair
2016/07/21 13:34:05
Can this be an enum class instead of a plain enum?
jaepark
2016/07/21 22:34:33
Done.
| |
| 53 OPEN_IN_CURRENT_TAB = 0, | |
| 54 OPEN_IN_NEW_BACKGROUND_TAB, | |
| 55 OPEN_IN_NEW_FOREGROUND_TAB, | |
| 56 OPEN_IN_NEW_WINDOW | |
| 57 }; | |
| 58 | |
| 52 // PDFEngine implementation. | 59 // PDFEngine implementation. |
| 53 bool New(const char* url, const char* headers) override; | 60 bool New(const char* url, const char* headers) override; |
| 54 void PageOffsetUpdated(const pp::Point& page_offset) override; | 61 void PageOffsetUpdated(const pp::Point& page_offset) override; |
| 55 void PluginSizeUpdated(const pp::Size& size) override; | 62 void PluginSizeUpdated(const pp::Size& size) override; |
| 56 void ScrolledToXPosition(int position) override; | 63 void ScrolledToXPosition(int position) override; |
| 57 void ScrolledToYPosition(int position) override; | 64 void ScrolledToYPosition(int position) override; |
| 58 void PrePaint() override; | 65 void PrePaint() override; |
| 59 void Paint(const pp::Rect& rect, | 66 void Paint(const pp::Rect& rect, |
| 60 pp::ImageData* image_data, | 67 pp::ImageData* image_data, |
| 61 std::vector<pp::Rect>* ready, | 68 std::vector<pp::Rect>* ready, |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 754 bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 761 bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
| 755 int pdf_buffer_size, | 762 int pdf_buffer_size, |
| 756 int page_number, | 763 int page_number, |
| 757 double* width, | 764 double* width, |
| 758 double* height) override; | 765 double* height) override; |
| 759 }; | 766 }; |
| 760 | 767 |
| 761 } // namespace chrome_pdf | 768 } // namespace chrome_pdf |
| 762 | 769 |
| 763 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ | 770 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ |
| OLD | NEW |