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

Side by Side Diff: xfa/fwl/core/fwl_noteimp.cpp

Issue 2464703006: Fold IFWL*::{Initialize|Finalize} into constructor/destructor (Closed)
Patch Set: Rebase to master Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/fwl_noteimp.h ('k') | xfa/fwl/core/ifwl_barcode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/core/fwl_noteimp.h" 7 #include "xfa/fwl/core/fwl_noteimp.h"
8 8
9 #include "core/fxcrt/fx_ext.h" 9 #include "core/fxcrt/fx_ext.h"
10 #include "third_party/base/stl_util.h" 10 #include "third_party/base/stl_util.h"
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 case CFWL_EventType::Idle: 753 case CFWL_EventType::Idle:
754 return !!(dwFilter & FWL_EVENT_IDLE_MASK); 754 return !!(dwFilter & FWL_EVENT_IDLE_MASK);
755 default: 755 default:
756 return !!(dwFilter & FWL_EVENT_CONTROL_MASK); 756 return !!(dwFilter & FWL_EVENT_CONTROL_MASK);
757 } 757 }
758 } 758 }
759 759
760 CFWL_ToolTipContainer* CFWL_ToolTipContainer::s_pInstance = nullptr; 760 CFWL_ToolTipContainer* CFWL_ToolTipContainer::s_pInstance = nullptr;
761 761
762 CFWL_ToolTipContainer::CFWL_ToolTipContainer() 762 CFWL_ToolTipContainer::CFWL_ToolTipContainer()
763 : m_pToolTipImp(nullptr), m_pToolTipDp(new CFWL_CoreToolTipDP(0, 2000)) {} 763 : m_pToolTipDp(new CFWL_CoreToolTipDP(0, 2000)) {}
764 764
765 CFWL_ToolTipContainer::~CFWL_ToolTipContainer() { 765 CFWL_ToolTipContainer::~CFWL_ToolTipContainer() {}
766 if (m_pToolTipImp) {
767 IFWL_ToolTip* pToolTip = static_cast<IFWL_ToolTip*>(m_pToolTipImp);
768 pToolTip->Finalize();
769 delete pToolTip;
770 }
771 }
772 766
773 // static 767 // static
774 CFWL_ToolTipContainer* CFWL_ToolTipContainer::getInstance() { 768 CFWL_ToolTipContainer* CFWL_ToolTipContainer::getInstance() {
775 if (!s_pInstance) 769 if (!s_pInstance)
776 s_pInstance = new CFWL_ToolTipContainer; 770 s_pInstance = new CFWL_ToolTipContainer;
777 return s_pInstance; 771 return s_pInstance;
778 } 772 }
779 773
780 // static 774 // static
781 void CFWL_ToolTipContainer::DeleteInstance() { 775 void CFWL_ToolTipContainer::DeleteInstance() {
782 delete s_pInstance; 776 delete s_pInstance;
783 s_pInstance = nullptr; 777 s_pInstance = nullptr;
784 } 778 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/fwl_noteimp.h ('k') | xfa/fwl/core/ifwl_barcode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698