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 #include "pdf/pdfium/pdfium_engine.h" | 5 #include "pdf/pdfium/pdfium_engine.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 FPDF_FORMFILLINFO::FFI_DoURIAction = Form_DoURIAction; | 576 FPDF_FORMFILLINFO::FFI_DoURIAction = Form_DoURIAction; |
577 FPDF_FORMFILLINFO::FFI_DoGoToAction = Form_DoGoToAction; | 577 FPDF_FORMFILLINFO::FFI_DoGoToAction = Form_DoGoToAction; |
578 #ifdef PDF_USE_XFA | 578 #ifdef PDF_USE_XFA |
579 FPDF_FORMFILLINFO::version = 2; | 579 FPDF_FORMFILLINFO::version = 2; |
580 FPDF_FORMFILLINFO::FFI_EmailTo = Form_EmailTo; | 580 FPDF_FORMFILLINFO::FFI_EmailTo = Form_EmailTo; |
581 FPDF_FORMFILLINFO::FFI_DisplayCaret = Form_DisplayCaret; | 581 FPDF_FORMFILLINFO::FFI_DisplayCaret = Form_DisplayCaret; |
582 FPDF_FORMFILLINFO::FFI_SetCurrentPage = Form_SetCurrentPage; | 582 FPDF_FORMFILLINFO::FFI_SetCurrentPage = Form_SetCurrentPage; |
583 FPDF_FORMFILLINFO::FFI_GetCurrentPageIndex = Form_GetCurrentPageIndex; | 583 FPDF_FORMFILLINFO::FFI_GetCurrentPageIndex = Form_GetCurrentPageIndex; |
584 FPDF_FORMFILLINFO::FFI_GetPageViewRect = Form_GetPageViewRect; | 584 FPDF_FORMFILLINFO::FFI_GetPageViewRect = Form_GetPageViewRect; |
585 FPDF_FORMFILLINFO::FFI_GetPlatform = Form_GetPlatform; | 585 FPDF_FORMFILLINFO::FFI_GetPlatform = Form_GetPlatform; |
| 586 FPDF_FORMFILLINFO::FFI_PageEvent = Form_PageEvent; |
586 FPDF_FORMFILLINFO::FFI_PopupMenu = Form_PopupMenu; | 587 FPDF_FORMFILLINFO::FFI_PopupMenu = Form_PopupMenu; |
587 FPDF_FORMFILLINFO::FFI_PostRequestURL = Form_PostRequestURL; | 588 FPDF_FORMFILLINFO::FFI_PostRequestURL = Form_PostRequestURL; |
588 FPDF_FORMFILLINFO::FFI_PutRequestURL = Form_PutRequestURL; | 589 FPDF_FORMFILLINFO::FFI_PutRequestURL = Form_PutRequestURL; |
589 FPDF_FORMFILLINFO::FFI_UploadTo = Form_UploadTo; | 590 FPDF_FORMFILLINFO::FFI_UploadTo = Form_UploadTo; |
590 FPDF_FORMFILLINFO::FFI_DownloadFromURL = Form_DownloadFromURL; | 591 FPDF_FORMFILLINFO::FFI_DownloadFromURL = Form_DownloadFromURL; |
591 FPDF_FORMFILLINFO::FFI_OpenFile = Form_OpenFile; | 592 FPDF_FORMFILLINFO::FFI_OpenFile = Form_OpenFile; |
592 FPDF_FORMFILLINFO::FFI_GotoURL = Form_GotoURL; | 593 FPDF_FORMFILLINFO::FFI_GotoURL = Form_GotoURL; |
593 FPDF_FORMFILLINFO::FFI_GetLanguage = Form_GetLanguage; | 594 FPDF_FORMFILLINFO::FFI_GetLanguage = Form_GetLanguage; |
594 #endif // PDF_USE_XFA | 595 #endif // PDF_USE_XFA |
595 IPDF_JSPLATFORM::version = 3; | 596 IPDF_JSPLATFORM::version = 3; |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 platform_flag = 2; | 788 platform_flag = 2; |
788 #endif | 789 #endif |
789 | 790 |
790 std::string javascript = "alert(\"Platform:" | 791 std::string javascript = "alert(\"Platform:" |
791 + base::DoubleToString(platform_flag) | 792 + base::DoubleToString(platform_flag) |
792 + "\")"; | 793 + "\")"; |
793 | 794 |
794 return platform_flag; | 795 return platform_flag; |
795 } | 796 } |
796 | 797 |
| 798 void PDFiumEngine::Form_PageEvent(FPDF_FORMFILLINFO* param, |
| 799 int iPageIndex, |
| 800 int iEventType) {} |
| 801 |
797 FPDF_BOOL PDFiumEngine::Form_PopupMenu(FPDF_FORMFILLINFO* param, | 802 FPDF_BOOL PDFiumEngine::Form_PopupMenu(FPDF_FORMFILLINFO* param, |
798 FPDF_PAGE page, | 803 FPDF_PAGE page, |
799 FPDF_WIDGET widget, | 804 FPDF_WIDGET widget, |
800 int menu_flag, | 805 int menu_flag, |
801 float x, | 806 float x, |
802 float y) { | 807 float y) { |
803 return false; | 808 return false; |
804 } | 809 } |
805 | 810 |
806 FPDF_BOOL PDFiumEngine::Form_PostRequestURL(FPDF_FORMFILLINFO* param, | 811 FPDF_BOOL PDFiumEngine::Form_PostRequestURL(FPDF_FORMFILLINFO* param, |
(...skipping 3137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3944 double* height) { | 3949 double* height) { |
3945 FPDF_DOCUMENT doc = FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, NULL); | 3950 FPDF_DOCUMENT doc = FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, NULL); |
3946 if (!doc) | 3951 if (!doc) |
3947 return false; | 3952 return false; |
3948 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; | 3953 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; |
3949 FPDF_CloseDocument(doc); | 3954 FPDF_CloseDocument(doc); |
3950 return success; | 3955 return success; |
3951 } | 3956 } |
3952 | 3957 |
3953 } // namespace chrome_pdf | 3958 } // namespace chrome_pdf |
OLD | NEW |