| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 pp::ImageData* image_data, | 416 pp::ImageData* image_data, |
| 417 void** region, | 417 void** region, |
| 418 int* stride) const; | 418 int* stride) const; |
| 419 | 419 |
| 420 // Called when the selection changes. | 420 // Called when the selection changes. |
| 421 void OnSelectionChanged(); | 421 void OnSelectionChanged(); |
| 422 | 422 |
| 423 // Common code shared by RotateClockwise() and RotateCounterclockwise(). | 423 // Common code shared by RotateClockwise() and RotateCounterclockwise(). |
| 424 void RotateInternal(); | 424 void RotateInternal(); |
| 425 | 425 |
| 426 // Helper function to handle mouse click when shift is already selected. |
| 427 void HandleShiftClick(const int last_page_index, |
| 428 const int page_index, |
| 429 const int char_index); |
| 430 |
| 426 // FPDF_FORMFILLINFO callbacks. | 431 // FPDF_FORMFILLINFO callbacks. |
| 427 static void Form_Invalidate(FPDF_FORMFILLINFO* param, | 432 static void Form_Invalidate(FPDF_FORMFILLINFO* param, |
| 428 FPDF_PAGE page, | 433 FPDF_PAGE page, |
| 429 double left, | 434 double left, |
| 430 double top, | 435 double top, |
| 431 double right, | 436 double right, |
| 432 double bottom); | 437 double bottom); |
| 433 static void Form_OutputSelectedRect(FPDF_FORMFILLINFO* param, | 438 static void Form_OutputSelectedRect(FPDF_FORMFILLINFO* param, |
| 434 FPDF_PAGE page, | 439 FPDF_PAGE page, |
| 435 double left, | 440 double left, |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 // The timeout to use for the current progressive paint. | 707 // The timeout to use for the current progressive paint. |
| 703 int progressive_paint_timeout_; | 708 int progressive_paint_timeout_; |
| 704 | 709 |
| 705 // Shadow matrix for generating the page shadow bitmap. | 710 // Shadow matrix for generating the page shadow bitmap. |
| 706 scoped_ptr<ShadowMatrix> page_shadow_; | 711 scoped_ptr<ShadowMatrix> page_shadow_; |
| 707 | 712 |
| 708 // Set to true if the user is being prompted for their password. Will be set | 713 // Set to true if the user is being prompted for their password. Will be set |
| 709 // to false after the user finishes getting their password. | 714 // to false after the user finishes getting their password. |
| 710 bool getting_password_; | 715 bool getting_password_; |
| 711 | 716 |
| 717 // keep value of char index at which last mouse down happened. |
| 718 int last_char_index_; |
| 719 |
| 712 DISALLOW_COPY_AND_ASSIGN(PDFiumEngine); | 720 DISALLOW_COPY_AND_ASSIGN(PDFiumEngine); |
| 713 }; | 721 }; |
| 714 | 722 |
| 715 // Create a local variable of this when calling PDFium functions which can call | 723 // Create a local variable of this when calling PDFium functions which can call |
| 716 // our global callback when an unsupported feature is reached. | 724 // our global callback when an unsupported feature is reached. |
| 717 class ScopedUnsupportedFeature { | 725 class ScopedUnsupportedFeature { |
| 718 public: | 726 public: |
| 719 explicit ScopedUnsupportedFeature(PDFiumEngine* engine); | 727 explicit ScopedUnsupportedFeature(PDFiumEngine* engine); |
| 720 ~ScopedUnsupportedFeature(); | 728 ~ScopedUnsupportedFeature(); |
| 721 private: | 729 private: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 747 | 755 |
| 748 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 756 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
| 749 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 757 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
| 750 int pdf_buffer_size, int page_number, | 758 int pdf_buffer_size, int page_number, |
| 751 double* width, double* height); | 759 double* width, double* height); |
| 752 }; | 760 }; |
| 753 | 761 |
| 754 } // namespace chrome_pdf | 762 } // namespace chrome_pdf |
| 755 | 763 |
| 756 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ | 764 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ |
| OLD | NEW |