summaryrefslogtreecommitdiff
path: root/samples/pdfium_test.cc
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-29 09:10:41 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-29 09:10:41 -0800
commitbd9325754999c2c3a01562ea090654f1ab07cc59 (patch)
treea07252668e75a4dbf1cc820f8175ecc0a867f974 /samples/pdfium_test.cc
parent61dc96f9aa2512807b62cfaec35b1cd012459a6f (diff)
downloadpdfium-bd9325754999c2c3a01562ea090654f1ab07cc59.tar.xz
Merge to XFA: Fix behaviour of app.alert() with a single object argument.
Original Review URL: https://codereview.chromium.org/1641693003 . (cherry picked from commit 66519af52b61ca158044651d0507d47efb364f87) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1639253008 .
Diffstat (limited to 'samples/pdfium_test.cc')
-rw-r--r--samples/pdfium_test.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index b1bce5172d..8c0a249f30 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -195,10 +195,15 @@ void WriteEmf(FPDF_PAGE page, const char* pdf_name, int num) {
}
#endif
-int ExampleAppAlert(IPDF_JSPLATFORM*, FPDF_WIDESTRING msg, FPDF_WIDESTRING,
- int, int) {
- std::wstring platform_string = GetPlatformWString(msg);
- printf("Alert: %ls\n", platform_string.c_str());
+int ExampleAppAlert(IPDF_JSPLATFORM*,
+ FPDF_WIDESTRING msg,
+ FPDF_WIDESTRING title,
+ int nType,
+ int nIcon) {
+ printf("%ls", GetPlatformWString(title).c_str());
+ if (nIcon || nType)
+ printf("[icon=%d,type=%d]", nIcon, nType);
+ printf(": %ls\n", GetPlatformWString(msg).c_str());
return 0;
}