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

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

Issue 2328573002: Split CPDFXFA_Document apart (Closed)
Patch Set: Fix 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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_editimp.cpp ('k') | xfa/fxfa/app/xfa_ffchoicelist.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/fxfa/include/xfa_ffapp.h" 7 #include "xfa/fxfa/include/xfa_ffapp.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 CXFA_TimeZoneProvider::Destroy(); 90 CXFA_TimeZoneProvider::Destroy();
91 } 91 }
92 92
93 CXFA_FFDocHandler* CXFA_FFApp::GetDocHandler() { 93 CXFA_FFDocHandler* CXFA_FFApp::GetDocHandler() {
94 if (!m_pDocHandler) 94 if (!m_pDocHandler)
95 m_pDocHandler.reset(new CXFA_FFDocHandler); 95 m_pDocHandler.reset(new CXFA_FFDocHandler);
96 return m_pDocHandler.get(); 96 return m_pDocHandler.get();
97 } 97 }
98 98
99 CXFA_FFDoc* CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, 99 CXFA_FFDoc* CXFA_FFApp::CreateDoc(IXFA_DocEnvironment* pDocEnvironment,
100 IFX_FileRead* pStream, 100 IFX_FileRead* pStream,
101 FX_BOOL bTakeOverFile) { 101 FX_BOOL bTakeOverFile) {
102 std::unique_ptr<CXFA_FFDoc> pDoc(new CXFA_FFDoc(this, pProvider)); 102 std::unique_ptr<CXFA_FFDoc> pDoc(new CXFA_FFDoc(this, pDocEnvironment));
103 FX_BOOL bSuccess = pDoc->OpenDoc(pStream, bTakeOverFile); 103 FX_BOOL bSuccess = pDoc->OpenDoc(pStream, bTakeOverFile);
104 return bSuccess ? pDoc.release() : nullptr; 104 return bSuccess ? pDoc.release() : nullptr;
105 } 105 }
106 106
107 CXFA_FFDoc* CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, 107 CXFA_FFDoc* CXFA_FFApp::CreateDoc(IXFA_DocEnvironment* pDocEnvironment,
108 CPDF_Document* pPDFDoc) { 108 CPDF_Document* pPDFDoc) {
109 if (!pPDFDoc) 109 if (!pPDFDoc)
110 return nullptr; 110 return nullptr;
111 111
112 std::unique_ptr<CXFA_FFDoc> pDoc(new CXFA_FFDoc(this, pProvider)); 112 std::unique_ptr<CXFA_FFDoc> pDoc(new CXFA_FFDoc(this, pDocEnvironment));
113 FX_BOOL bSuccess = pDoc->OpenDoc(pPDFDoc); 113 FX_BOOL bSuccess = pDoc->OpenDoc(pPDFDoc);
114 return bSuccess ? pDoc.release() : nullptr; 114 return bSuccess ? pDoc.release() : nullptr;
115 } 115 }
116 116
117 void CXFA_FFApp::SetDefaultFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr) { 117 void CXFA_FFApp::SetDefaultFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr) {
118 if (!m_pFontMgr) 118 if (!m_pFontMgr)
119 m_pFontMgr.reset(new CXFA_FontMgr()); 119 m_pFontMgr.reset(new CXFA_FontMgr());
120 m_pFontMgr->SetDefFontMgr(std::move(pFontMgr)); 120 m_pFontMgr->SetDefFontMgr(std::move(pFontMgr));
121 } 121 }
122 122
(...skipping 26 matching lines...) Expand all
149 pDelegate->OnSetCapability(FWL_WGTMGR_DisableThread | 149 pDelegate->OnSetCapability(FWL_WGTMGR_DisableThread |
150 FWL_WGTMGR_DisableForm); 150 FWL_WGTMGR_DisableForm);
151 m_pWidgetMgrDelegate = pDelegate; 151 m_pWidgetMgrDelegate = pDelegate;
152 } 152 }
153 return m_pAdapterWidgetMgr.get(); 153 return m_pAdapterWidgetMgr.get();
154 } 154 }
155 155
156 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() const { 156 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() const {
157 return m_pProvider->GetTimerMgr(); 157 return m_pProvider->GetTimerMgr();
158 } 158 }
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_editimp.cpp ('k') | xfa/fxfa/app/xfa_ffchoicelist.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698