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

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

Issue 2430563003: Merge IFWL_App and FWL_AppImp together (Closed)
Patch Set: Cleanup Created 4 years, 2 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
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/fxfa/xfa_ffapp.h" 7 #include "xfa/fxfa/xfa_ffapp.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return FALSE; 67 return FALSE;
68 } 68 }
69 69
70 void CXFA_FileRead::Release() { 70 void CXFA_FileRead::Release() {
71 delete this; 71 delete this;
72 } 72 }
73 73
74 CXFA_FFApp::CXFA_FFApp(IXFA_AppProvider* pProvider) 74 CXFA_FFApp::CXFA_FFApp(IXFA_AppProvider* pProvider)
75 : m_pProvider(pProvider), 75 : m_pProvider(pProvider),
76 m_pWidgetMgrDelegate(nullptr), 76 m_pWidgetMgrDelegate(nullptr),
77 m_pFWLApp(IFWL_App::Create(this)) { 77 m_pFWLApp(pdfium::MakeUnique<IFWL_App>(this)) {
78 FWL_SetApp(m_pFWLApp.get()); 78 FWL_SetApp(m_pFWLApp.get());
79 m_pFWLApp->Initialize();
80 CXFA_TimeZoneProvider::Create(); 79 CXFA_TimeZoneProvider::Create();
81 } 80 }
82 81
83 CXFA_FFApp::~CXFA_FFApp() { 82 CXFA_FFApp::~CXFA_FFApp() {
84 if (m_pFWLApp) {
85 m_pFWLApp->Finalize();
86 m_pFWLApp->Release();
87 }
88
89 CXFA_TimeZoneProvider::Destroy(); 83 CXFA_TimeZoneProvider::Destroy();
90 } 84 }
91 85
92 CXFA_FFDocHandler* CXFA_FFApp::GetDocHandler() { 86 CXFA_FFDocHandler* CXFA_FFApp::GetDocHandler() {
93 if (!m_pDocHandler) 87 if (!m_pDocHandler)
94 m_pDocHandler.reset(new CXFA_FFDocHandler); 88 m_pDocHandler.reset(new CXFA_FFDocHandler);
95 return m_pDocHandler.get(); 89 return m_pDocHandler.get();
96 } 90 }
97 91
98 CXFA_FFDoc* CXFA_FFApp::CreateDoc(IXFA_DocEnvironment* pDocEnvironment, 92 CXFA_FFDoc* CXFA_FFApp::CreateDoc(IXFA_DocEnvironment* pDocEnvironment,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 pDelegate->OnSetCapability(FWL_WGTMGR_DisableThread | 142 pDelegate->OnSetCapability(FWL_WGTMGR_DisableThread |
149 FWL_WGTMGR_DisableForm); 143 FWL_WGTMGR_DisableForm);
150 m_pWidgetMgrDelegate = pDelegate; 144 m_pWidgetMgrDelegate = pDelegate;
151 } 145 }
152 return m_pAdapterWidgetMgr.get(); 146 return m_pAdapterWidgetMgr.get();
153 } 147 }
154 148
155 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() const { 149 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() const {
156 return m_pProvider->GetTimerMgr(); 150 return m_pProvider->GetTimerMgr();
157 } 151 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698