| 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 | 718 |
| 719 DISALLOW_COPY_AND_ASSIGN(PDFiumEngine); | 719 DISALLOW_COPY_AND_ASSIGN(PDFiumEngine); |
| 720 }; | 720 }; |
| 721 | 721 |
| 722 // Create a local variable of this when calling PDFium functions which can call | 722 // Create a local variable of this when calling PDFium functions which can call |
| 723 // our global callback when an unsupported feature is reached. | 723 // our global callback when an unsupported feature is reached. |
| 724 class ScopedUnsupportedFeature { | 724 class ScopedUnsupportedFeature { |
| 725 public: | 725 public: |
| 726 explicit ScopedUnsupportedFeature(PDFiumEngine* engine); | 726 explicit ScopedUnsupportedFeature(PDFiumEngine* engine); |
| 727 ~ScopedUnsupportedFeature(); | 727 ~ScopedUnsupportedFeature(); |
| 728 |
| 728 private: | 729 private: |
| 729 PDFiumEngine* engine_; | 730 PDFiumEngine* const old_engine_; |
| 730 PDFiumEngine* old_engine_; | |
| 731 }; | 731 }; |
| 732 | 732 |
| 733 class PDFiumEngineExports : public PDFEngineExports { | 733 class PDFiumEngineExports : public PDFEngineExports { |
| 734 public: | 734 public: |
| 735 PDFiumEngineExports() {} | 735 PDFiumEngineExports() {} |
| 736 | 736 |
| 737 // PDFEngineExports: | 737 // PDFEngineExports: |
| 738 #if defined(OS_WIN) | 738 #if defined(OS_WIN) |
| 739 bool RenderPDFPageToDC(const void* pdf_buffer, | 739 bool RenderPDFPageToDC(const void* pdf_buffer, |
| 740 int buffer_size, | 740 int buffer_size, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 754 bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 754 bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
| 755 int pdf_buffer_size, | 755 int pdf_buffer_size, |
| 756 int page_number, | 756 int page_number, |
| 757 double* width, | 757 double* width, |
| 758 double* height) override; | 758 double* height) override; |
| 759 }; | 759 }; |
| 760 | 760 |
| 761 } // namespace chrome_pdf | 761 } // namespace chrome_pdf |
| 762 | 762 |
| 763 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ | 763 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ |
| OLD | NEW |