From c30b4e16885c8fd5f59965f48b61ec033ae4691a Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 16 Jul 2018 20:49:56 +0000 Subject: Alert embedder when attempting to save XFA form This CL adds an experimental callback to the form fill API that allows PDFium to signal to the embedder that an attempt call save occurred. The embedder is responsible for showing an appropriate UI when this occurs. When PDF saving is implemented the API can be removed. BUG=pdfium:953 Change-Id: Iba30f4d0547fe773b793e499995be426626092a0 Reviewed-on: https://pdfium-review.googlesource.com/35870 Commit-Queue: Ryan Harrison Reviewed-by: Tom Sepez --- fpdfsdk/cpdfsdk_formfillenvironment.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fpdfsdk/cpdfsdk_formfillenvironment.h') diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h index dacc02f95d..1cf078e3aa 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.h +++ b/fpdfsdk/cpdfsdk_formfillenvironment.h @@ -208,6 +208,9 @@ class CPDFSDK_FormFillEnvironment CPDFSDK_ActionHandler* GetActionHandler(); // Creates if not present. CPDFSDK_InterForm* GetInterForm(); // Creates if not present. + void SetSaveCalled(FORM_SAVECALLED callback) { m_SaveCalled = callback; } + void SaveCalled(); + private: IPDF_Page* GetPage(int nIndex); @@ -223,6 +226,7 @@ class CPDFSDK_FormFillEnvironment std::unique_ptr m_pSysHandler; bool m_bChangeMask; bool m_bBeingDestroyed; + FORM_SAVECALLED m_SaveCalled; }; #endif // FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ -- cgit v1.2.3