From bd9325754999c2c3a01562ea090654f1ab07cc59 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 29 Jan 2016 09:10:41 -0800 Subject: 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 . --- samples/pdfium_test.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'samples') 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; } -- cgit v1.2.3