summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/cpdfsdk_widget.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-09-07 05:46:55 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-07 05:46:55 -0700
commitce04a458828b45035dab46c13e14a1f0ae67a2b7 (patch)
tree089f5eb29d12518d8de99d9c30dba8da3d441e1f /fpdfsdk/include/cpdfsdk_widget.h
parent0a765b832c5b9dd0a46fb5a25ce09d52dedb336b (diff)
downloadpdfium-ce04a458828b45035dab46c13e14a1f0ae67a2b7.tar.xz
Add observer for BAAnnots from Javascript
This Cl moves the observer code from the CPDFSDK_Widget up into the CPDFSDK_Annot base class and then adds a second observer for CPDFSDK_BAAnnot objects. This allows us to attach an observer to the Annot javascript class which will update its internal pointer to the BAAnnot if the BAAnnot is destroyed by the CPDFSDK_PageView being destroyed. BUG=chromium:642307 Review-Url: https://codereview.chromium.org/2306663002
Diffstat (limited to 'fpdfsdk/include/cpdfsdk_widget.h')
-rw-r--r--fpdfsdk/include/cpdfsdk_widget.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/fpdfsdk/include/cpdfsdk_widget.h b/fpdfsdk/include/cpdfsdk_widget.h
index 51116f9581..88692d553e 100644
--- a/fpdfsdk/include/cpdfsdk_widget.h
+++ b/fpdfsdk/include/cpdfsdk_widget.h
@@ -35,17 +35,6 @@ class CXFA_FFWidgetHandler;
class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
public:
- class Observer {
- public:
- explicit Observer(CPDFSDK_Widget** pWatchedPtr);
- ~Observer();
-
- void OnWidgetDestroyed();
-
- private:
- CPDFSDK_Widget** m_pWatchedPtr;
- };
-
#ifdef PDF_ENABLE_XFA
CXFA_FFWidget* GetMixXFAWidget() const;
CXFA_FFWidget* GetGroupMixXFAWidget();
@@ -75,9 +64,6 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
CPDFSDK_InterForm* pInterForm);
~CPDFSDK_Widget() override;
- void AddObserver(Observer* observer);
- void RemoveObserver(Observer* observer);
-
bool IsSignatureWidget() const override;
CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT) override;
FX_BOOL IsAppearanceValid() override;
@@ -180,7 +166,6 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
FX_BOOL m_bAppModified;
int32_t m_nAppAge;
int32_t m_nValueAge;
- std::set<Observer*> m_Observers;
#ifdef PDF_ENABLE_XFA
mutable CXFA_FFWidget* m_hMixXFAWidget;