Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: fpdfsdk/cpdfsdk_widgethandler.cpp

Issue 2368403002: Watch destruction of widgets around OnAAction() method (Closed)
Patch Set: blown merge Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/cpdfsdk_pageview.cpp ('k') | fpdfsdk/cpdfsdk_xfawidgethandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/cpdfsdk_widgethandler.cpp
diff --git a/fpdfsdk/cpdfsdk_widgethandler.cpp b/fpdfsdk/cpdfsdk_widgethandler.cpp
index 3998cb4f8a68892f0464655b7afcb852fab43d98..e4e093f8185925cd6d2a657456ad1df82d2aafa3 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_widgethandler.cpp
@@ -110,65 +110,66 @@ void CPDFSDK_WidgetHandler::OnDelete(CPDFSDK_Annot* pAnnot) {}
void CPDFSDK_WidgetHandler::OnRelease(CPDFSDK_Annot* pAnnot) {}
void CPDFSDK_WidgetHandler::OnMouseEnter(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
+ CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlag) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
m_pFormFiller->OnMouseEnter(pPageView, pAnnot, nFlag);
}
void CPDFSDK_WidgetHandler::OnMouseExit(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
+ CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlag) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
m_pFormFiller->OnMouseExit(pPageView, pAnnot, nFlag);
}
FX_BOOL CPDFSDK_WidgetHandler::OnLButtonDown(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
+ CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
const CFX_FloatPoint& point) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
return m_pFormFiller->OnLButtonDown(pPageView, pAnnot, nFlags, point);
return FALSE;
}
FX_BOOL CPDFSDK_WidgetHandler::OnLButtonUp(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
+ CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
const CFX_FloatPoint& point) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
return m_pFormFiller->OnLButtonUp(pPageView, pAnnot, nFlags, point);
return FALSE;
}
-FX_BOOL CPDFSDK_WidgetHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
- uint32_t nFlags,
- const CFX_FloatPoint& point) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+FX_BOOL CPDFSDK_WidgetHandler::OnLButtonDblClk(
+ CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot::ObservedPtr* pAnnot,
+ uint32_t nFlags,
+ const CFX_FloatPoint& point) {
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
return m_pFormFiller->OnLButtonDblClk(pPageView, pAnnot, nFlags, point);
return FALSE;
}
FX_BOOL CPDFSDK_WidgetHandler::OnMouseMove(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
+ CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
const CFX_FloatPoint& point) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
return m_pFormFiller->OnMouseMove(pPageView, pAnnot, nFlags, point);
return FALSE;
}
FX_BOOL CPDFSDK_WidgetHandler::OnMouseWheel(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
+ CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
short zDelta,
const CFX_FloatPoint& point) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
return m_pFormFiller->OnMouseWheel(pPageView, pAnnot, nFlags, zDelta,
point);
@@ -176,29 +177,30 @@ FX_BOOL CPDFSDK_WidgetHandler::OnMouseWheel(CPDFSDK_PageView* pPageView,
}
FX_BOOL CPDFSDK_WidgetHandler::OnRButtonDown(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
+ CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
const CFX_FloatPoint& point) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
return m_pFormFiller->OnRButtonDown(pPageView, pAnnot, nFlags, point);
return FALSE;
}
FX_BOOL CPDFSDK_WidgetHandler::OnRButtonUp(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
+ CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
const CFX_FloatPoint& point) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
return m_pFormFiller->OnRButtonUp(pPageView, pAnnot, nFlags, point);
return FALSE;
}
-FX_BOOL CPDFSDK_WidgetHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
- uint32_t nFlags,
- const CFX_FloatPoint& point) {
+FX_BOOL CPDFSDK_WidgetHandler::OnRButtonDblClk(
+ CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot::ObservedPtr* pAnnot,
+ uint32_t nFlags,
+ const CFX_FloatPoint& point) {
return FALSE;
}
@@ -260,25 +262,26 @@ void CPDFSDK_WidgetHandler::OnLoad(CPDFSDK_Annot* pAnnot) {
m_pFormFiller->OnLoad(pAnnot);
}
-FX_BOOL CPDFSDK_WidgetHandler::OnSetFocus(CPDFSDK_Annot* pAnnot,
+FX_BOOL CPDFSDK_WidgetHandler::OnSetFocus(CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlag) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
return m_pFormFiller->OnSetFocus(pAnnot, nFlag);
return TRUE;
}
-FX_BOOL CPDFSDK_WidgetHandler::OnKillFocus(CPDFSDK_Annot* pAnnot,
+FX_BOOL CPDFSDK_WidgetHandler::OnKillFocus(CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlag) {
- if (!pAnnot->IsSignatureWidget() && m_pFormFiller)
+ if (!(*pAnnot)->IsSignatureWidget() && m_pFormFiller)
return m_pFormFiller->OnKillFocus(pAnnot, nFlag);
return TRUE;
}
#ifdef PDF_ENABLE_XFA
-FX_BOOL CPDFSDK_WidgetHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot,
- CPDFSDK_Annot* pNewAnnot) {
+FX_BOOL CPDFSDK_WidgetHandler::OnXFAChangedFocus(
+ CPDFSDK_Annot::ObservedPtr* pOldAnnot,
+ CPDFSDK_Annot::ObservedPtr* pNewAnnot) {
return TRUE;
}
#endif // PDF_ENABLE_XFA
« no previous file with comments | « fpdfsdk/cpdfsdk_pageview.cpp ('k') | fpdfsdk/cpdfsdk_xfawidgethandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698