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

Unified Diff: samples/pdfium_test.cc

Issue 1645413002: Fix botched "CC:" parameter passing in JS_DocmailForm(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rename back to "params". 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/javascript/app.cpp ('k') | testing/resources/javascript/app_mailmsg.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/pdfium_test.cc
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 3ad0e62626db2390217b0c8e2cfa7a69c6698654..31de532842b17d049cf9c97c2d40622ce70db472 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -211,6 +211,21 @@ void ExampleDocGotoPage(IPDF_JSPLATFORM*, int pageNumber) {
printf("Goto Page: %d\n", pageNumber);
}
+void ExampleDocMail(IPDF_JSPLATFORM*,
+ void* mailData,
+ int length,
+ FPDF_BOOL bUI,
+ FPDF_WIDESTRING To,
+ FPDF_WIDESTRING Subject,
+ FPDF_WIDESTRING CC,
+ FPDF_WIDESTRING BCC,
+ FPDF_WIDESTRING Msg) {
+ printf("Mail Msg: %d, to=%ls, cc=%ls, bcc=%ls, subject=%ls, body=%ls\n", bUI,
+ GetPlatformWString(To).c_str(), GetPlatformWString(CC).c_str(),
+ GetPlatformWString(BCC).c_str(), GetPlatformWString(Subject).c_str(),
+ GetPlatformWString(Msg).c_str());
+}
+
void ExampleUnsupportedHandler(UNSUPPORT_INFO*, int type) {
std::string feature = "Unknown";
switch (type) {
@@ -411,6 +426,7 @@ void RenderPdf(const std::string& name, const char* pBuf, size_t len,
platform_callbacks.version = 3;
platform_callbacks.app_alert = ExampleAppAlert;
platform_callbacks.Doc_gotoPage = ExampleDocGotoPage;
+ platform_callbacks.Doc_mail = ExampleDocMail;
FPDF_FORMFILLINFO form_callbacks;
memset(&form_callbacks, '\0', sizeof(form_callbacks));
« no previous file with comments | « fpdfsdk/src/javascript/app.cpp ('k') | testing/resources/javascript/app_mailmsg.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698