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

Unified Diff: fpdfsdk/include/cpdfsdk_pageview.h

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/include/cpdfsdk_document.h ('k') | fpdfsdk/include/cpdfsdk_widgethandler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/cpdfsdk_pageview.h
diff --git a/fpdfsdk/include/cpdfsdk_pageview.h b/fpdfsdk/include/cpdfsdk_pageview.h
index d22b6b48a0aab84a799d97acd59bc3a6e9e61e4f..2a54dffc3098cd06fd186a807c3efd4fbf8814c3 100644
--- a/fpdfsdk/include/cpdfsdk_pageview.h
+++ b/fpdfsdk/include/cpdfsdk_pageview.h
@@ -12,6 +12,7 @@
#include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
#include "core/fxcrt/include/fx_system.h"
+#include "fpdfsdk/include/cpdfsdk_annot.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
class CFX_RenderDevice;
@@ -39,7 +40,8 @@ class CPDFSDK_PageView final : public CPDF_Page::View {
const CPDF_Annot* GetPDFWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY);
CPDFSDK_Annot* GetFXWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY);
CPDFSDK_Annot* GetFocusAnnot();
- void SetFocusAnnot(CPDFSDK_Annot* pSDKAnnot, uint32_t nFlag = 0) {
+ void SetFocusAnnot(CPDFSDK_Annot::ObservedPtr* pSDKAnnot,
+ uint32_t nFlag = 0) {
m_pSDKDoc->SetFocusAnnot(pSDKAnnot, nFlag);
}
FX_BOOL KillFocusAnnot(uint32_t nFlag = 0) {
@@ -108,7 +110,7 @@ class CPDFSDK_PageView final : public CPDF_Page::View {
std::unique_ptr<CPDF_AnnotList> m_pAnnotList;
std::vector<CPDFSDK_Annot*> m_fxAnnotArray;
CPDFSDK_Document* const m_pSDKDoc;
- CPDFSDK_Annot* m_CaptureWidget;
+ CPDFSDK_Annot::ObservedPtr m_pCaptureWidget;
#ifndef PDF_ENABLE_XFA
bool m_bOwnsPage;
#endif // PDF_ENABLE_XFA
« no previous file with comments | « fpdfsdk/include/cpdfsdk_document.h ('k') | fpdfsdk/include/cpdfsdk_widgethandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698