summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/cpdfsdk_widget.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp32
1 files changed, 1 insertions, 31 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 73ba23d076..2ddbccc28c 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -26,7 +26,6 @@
#include "fpdfsdk/include/fsdk_mgr.h"
#include "fpdfsdk/pdfwindow/PWL_Edit.h"
#include "fpdfsdk/pdfwindow/PWL_Utils.h"
-#include "third_party/base/stl_util.h"
#ifdef PDF_ENABLE_XFA
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h"
@@ -37,22 +36,6 @@
#include "xfa/fxfa/include/xfa_ffwidgethandler.h"
#endif // PDF_ENABLE_XFA
-CPDFSDK_Widget::Observer::Observer(CPDFSDK_Widget** pWatchedPtr)
- : m_pWatchedPtr(pWatchedPtr) {
- (*m_pWatchedPtr)->AddObserver(this);
-}
-
-CPDFSDK_Widget::Observer::~Observer() {
- if (m_pWatchedPtr)
- (*m_pWatchedPtr)->RemoveObserver(this);
-}
-
-void CPDFSDK_Widget::Observer::OnWidgetDestroyed() {
- ASSERT(m_pWatchedPtr);
- *m_pWatchedPtr = nullptr;
- m_pWatchedPtr = nullptr;
-}
-
CPDFSDK_Widget::CPDFSDK_Widget(CPDF_Annot* pAnnot,
CPDFSDK_PageView* pPageView,
CPDFSDK_InterForm* pInterForm)
@@ -68,20 +51,7 @@ CPDFSDK_Widget::CPDFSDK_Widget(CPDF_Annot* pAnnot,
{
}
-CPDFSDK_Widget::~CPDFSDK_Widget() {
- for (auto* pObserver : m_Observers)
- pObserver->OnWidgetDestroyed();
-}
-
-void CPDFSDK_Widget::AddObserver(Observer* pObserver) {
- ASSERT(!pdfium::ContainsKey(m_Observers, pObserver));
- m_Observers.insert(pObserver);
-}
-
-void CPDFSDK_Widget::RemoveObserver(Observer* pObserver) {
- ASSERT(pdfium::ContainsKey(m_Observers, pObserver));
- m_Observers.erase(pObserver);
-}
+CPDFSDK_Widget::~CPDFSDK_Widget() {}
#ifdef PDF_ENABLE_XFA
CXFA_FFWidget* CPDFSDK_Widget::GetMixXFAWidget() const {