Rename IPDF_FormNotify to CPDF_InteractiveForm::NotifierIface
Associate the interface with the class that tracks/uses it. In
some ideal world, the IXXX_* classes would have multiple concrete
implementations from which to select and the *Iface classes would
exist for layering.
Change-Id: Ic78fce2200cbd00bf27fa726b4527f39d2b373e0
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/59790
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_interactiveform.cpp b/fpdfsdk/cpdfsdk_interactiveform.cpp
index 2f888b4..9e7c548 100644
--- a/fpdfsdk/cpdfsdk_interactiveform.cpp
+++ b/fpdfsdk/cpdfsdk_interactiveform.cpp
@@ -115,8 +115,7 @@
: m_pFormFillEnv(pFormFillEnv),
m_pInteractiveForm(pdfium::MakeUnique<CPDF_InteractiveForm>(
m_pFormFillEnv->GetPDFDocument())) {
- ASSERT(m_pFormFillEnv);
- m_pInteractiveForm->SetFormNotify(this);
+ m_pInteractiveForm->SetNotifierIface(this);
RemoveAllHighLights();
}
diff --git a/fpdfsdk/cpdfsdk_interactiveform.h b/fpdfsdk/cpdfsdk_interactiveform.h
index ec76bee..df931d1 100644
--- a/fpdfsdk/cpdfsdk_interactiveform.h
+++ b/fpdfsdk/cpdfsdk_interactiveform.h
@@ -12,7 +12,7 @@
#include <vector>
#include "core/fpdfdoc/cpdf_action.h"
-#include "core/fpdfdoc/ipdf_formnotify.h"
+#include "core/fpdfdoc/cpdf_interactiveform.h"
#include "core/fxcrt/unowned_ptr.h"
#include "core/fxge/fx_dib.h"
#include "fpdfsdk/cpdfsdk_widget.h"
@@ -21,11 +21,11 @@
class CPDF_Dictionary;
class CPDF_FormControl;
class CPDF_FormField;
-class CPDF_InteractiveForm;
class CPDF_Object;
class CPDFSDK_FormFillEnvironment;
-class CPDFSDK_InteractiveForm final : public IPDF_FormNotify {
+class CPDFSDK_InteractiveForm final
+ : public CPDF_InteractiveForm::NotifierIface {
public:
explicit CPDFSDK_InteractiveForm(CPDFSDK_FormFillEnvironment* pFormFillEnv);
~CPDFSDK_InteractiveForm() override;
@@ -91,7 +91,7 @@
FX_COLORREF GetHighlightColor(FormFieldType fieldType);
private:
- // IPDF_FormNotify:
+ // CPDF_InteractiveForm::NotifierIface:
bool BeforeValueChange(CPDF_FormField* pField,
const WideString& csValue) override;
void AfterValueChange(CPDF_FormField* pField) override;