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

Side by Side Diff: xfa/fxfa/app/xfa_ffapp.cpp

Issue 1857893002: Cleanup the FF Handler proxy methods. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_editimp.cpp ('k') | xfa/fxfa/app/xfa_ffbarcode.cpp » ('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/include/fxfa/xfa_ffapp.h" 7 #include "xfa/include/fxfa/xfa_ffapp.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 : m_pDocHandler(nullptr), 66 : m_pDocHandler(nullptr),
67 m_pFWLTheme(nullptr), 67 m_pFWLTheme(nullptr),
68 m_pProvider(pProvider), 68 m_pProvider(pProvider),
69 m_pFontMgr(nullptr), 69 m_pFontMgr(nullptr),
70 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 70 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
71 m_pFontSource(nullptr), 71 m_pFontSource(nullptr),
72 #endif 72 #endif
73 m_pAdapterWidgetMgr(nullptr), 73 m_pAdapterWidgetMgr(nullptr),
74 m_pWidgetMgrDelegate(nullptr), 74 m_pWidgetMgrDelegate(nullptr),
75 m_pFDEFontMgr(nullptr), 75 m_pFDEFontMgr(nullptr),
76 m_pMenuHandler(nullptr),
77 m_pAdapterThreadMgr(nullptr) { 76 m_pAdapterThreadMgr(nullptr) {
78 m_pFWLApp = IFWL_App::Create(this); 77 m_pFWLApp = IFWL_App::Create(this);
79 FWL_SetApp(m_pFWLApp); 78 FWL_SetApp(m_pFWLApp);
80 m_pFWLApp->Initialize(); 79 m_pFWLApp->Initialize();
81 CXFA_TimeZoneProvider::Create(); 80 CXFA_TimeZoneProvider::Create();
82 } 81 }
83 CXFA_FFApp::~CXFA_FFApp() { 82 CXFA_FFApp::~CXFA_FFApp() {
84 delete m_pDocHandler; 83 delete m_pDocHandler;
85 if (m_pFWLApp) { 84 if (m_pFWLApp) {
86 m_pFWLApp->Finalize(); 85 m_pFWLApp->Finalize();
87 m_pFWLApp->Release(); 86 m_pFWLApp->Release();
88 delete m_pFWLApp; 87 delete m_pFWLApp;
89 } 88 }
90 if (m_pFWLTheme) 89 if (m_pFWLTheme)
91 m_pFWLTheme->Release(); 90 m_pFWLTheme->Release();
92 delete m_pAdapterWidgetMgr; 91 delete m_pAdapterWidgetMgr;
93 delete m_pAdapterThreadMgr; 92 delete m_pAdapterThreadMgr;
94 delete m_pMenuHandler; 93
95 CXFA_TimeZoneProvider::Destroy(); 94 CXFA_TimeZoneProvider::Destroy();
96 delete m_pFontMgr; 95 delete m_pFontMgr;
97 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 96 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
98 if (m_pFontSource) 97 if (m_pFontSource)
99 m_pFontSource->Release(); 98 m_pFontSource->Release();
100 #endif 99 #endif
101 if (m_pFDEFontMgr) 100 if (m_pFDEFontMgr)
102 m_pFDEFontMgr->Release(); 101 m_pFDEFontMgr->Release();
103 } 102 }
104 CXFA_FFMenuHandler* CXFA_FFApp::GetMenuHandler() { 103
105 if (!m_pMenuHandler) {
106 m_pMenuHandler = new CXFA_FFMenuHandler;
107 }
108 return m_pMenuHandler;
109 }
110 CXFA_FFDocHandler* CXFA_FFApp::GetDocHandler() { 104 CXFA_FFDocHandler* CXFA_FFApp::GetDocHandler() {
111 if (!m_pDocHandler) { 105 if (!m_pDocHandler) {
112 m_pDocHandler = new CXFA_FFDocHandler; 106 m_pDocHandler = new CXFA_FFDocHandler;
113 } 107 }
114 return m_pDocHandler; 108 return m_pDocHandler;
115 } 109 }
116 CXFA_FFDoc* CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, 110 CXFA_FFDoc* CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider,
117 IFX_FileRead* pStream, 111 IFX_FileRead* pStream,
118 FX_BOOL bTakeOverFile) { 112 FX_BOOL bTakeOverFile) {
119 CXFA_FFDoc* pDoc = new CXFA_FFDoc(this, pProvider); 113 CXFA_FFDoc* pDoc = new CXFA_FFDoc(this, pProvider);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 170 }
177 IFWL_AdapterThreadMgr* CXFA_FFApp::GetThreadMgr() { 171 IFWL_AdapterThreadMgr* CXFA_FFApp::GetThreadMgr() {
178 if (!m_pAdapterThreadMgr) { 172 if (!m_pAdapterThreadMgr) {
179 m_pAdapterThreadMgr = new CFWL_SDAdapterThreadMgr; 173 m_pAdapterThreadMgr = new CFWL_SDAdapterThreadMgr;
180 } 174 }
181 return m_pAdapterThreadMgr; 175 return m_pAdapterThreadMgr;
182 } 176 }
183 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() { 177 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() {
184 return m_pProvider->GetTimerMgr(); 178 return m_pProvider->GetTimerMgr();
185 } 179 }
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_editimp.cpp ('k') | xfa/fxfa/app/xfa_ffbarcode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698