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

Unified Diff: xfa/src/fwl/src/core/fwl_noteimp.cpp

Issue 856623004: Merge to XFA: PDFium embeddertests. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: fix segvs. Created 5 years, 11 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 | « xfa/src/fwl/src/core/fwl_appimp.cpp ('k') | xfa/src/fwl/src/core/include/fwl_noteimp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fwl/src/core/fwl_noteimp.cpp
diff --git a/xfa/src/fwl/src/core/fwl_noteimp.cpp b/xfa/src/fwl/src/core/fwl_noteimp.cpp
index 40f0c1137dace33d4e247ccec6f258fccfd1bd2d..417020ac0fd68d2f87224919f5133ad41d99bdc8 100644
--- a/xfa/src/fwl/src/core/fwl_noteimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_noteimp.cpp
@@ -938,6 +938,9 @@ FX_BOOL CFWL_EventTarget::IsFilterEvent(CFWL_Event *pEvent, FX_DWORD dwFilter)
}
return bRet;
}
+
+CFWL_ToolTipContainer* CFWL_ToolTipContainer::s_pInstance = NULL;
+
CFWL_ToolTipContainer::CFWL_ToolTipContainer()
: pCurTarget(NULL)
, m_pToolTipImp(NULL)
@@ -959,13 +962,21 @@ CFWL_ToolTipContainer::~CFWL_ToolTipContainer()
m_ToolTipDp = NULL;
}
}
+// static
CFWL_ToolTipContainer* CFWL_ToolTipContainer::getInstance()
{
- static CFWL_ToolTipContainer * _toolTipContainer = NULL;
- if (!_toolTipContainer) {
- _toolTipContainer = FX_NEW CFWL_ToolTipContainer;
+ if (!s_pInstance) {
+ s_pInstance = FX_NEW CFWL_ToolTipContainer;
+ }
+ return s_pInstance;
+}
+// static
+void CFWL_ToolTipContainer::DeleteInstance()
+{
+ if (s_pInstance) {
+ delete s_pInstance;
+ s_pInstance = NULL;
}
- return _toolTipContainer;
}
FX_ERR CFWL_ToolTipContainer::AddToolTipTarget(IFWL_ToolTipTarget *pTarget)
{
« no previous file with comments | « xfa/src/fwl/src/core/fwl_appimp.cpp ('k') | xfa/src/fwl/src/core/include/fwl_noteimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698