Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: pdf/pdfium/pdfium_engine.cc

Issue 1643943002: Add a callback function: PDFiumEngine::Form_PageEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pdf/pdfium/pdfium_engine.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698