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

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

Issue 2494883002: Remove IFGAS_FontMgr and clean up (the renamed) CFGAS_FontMgr a little. (Closed)
Patch Set: Nits 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/theme/cfwl_widgettp.cpp ('k') | xfa/fxfa/app/xfa_fontmgr.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/xfa_ffapp.h" 7 #include "xfa/fxfa/xfa_ffapp.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
11 11
12 #include "xfa/fgas/font/fgas_stdfontmgr.h" 12 #include "xfa/fgas/font/cfgas_fontmgr.h"
13 #include "xfa/fwl/core/cfwl_widgetmgr.h" 13 #include "xfa/fwl/core/cfwl_widgetmgr.h"
14 #include "xfa/fwl/core/fwl_noteimp.h" 14 #include "xfa/fwl/core/fwl_noteimp.h"
15 #include "xfa/fxfa/app/xfa_fwladapter.h" 15 #include "xfa/fxfa/app/xfa_fwladapter.h"
16 #include "xfa/fxfa/app/xfa_fwltheme.h" 16 #include "xfa/fxfa/app/xfa_fwltheme.h"
17 #include "xfa/fxfa/xfa_ffdoc.h" 17 #include "xfa/fxfa/xfa_ffdoc.h"
18 #include "xfa/fxfa/xfa_ffdochandler.h" 18 #include "xfa/fxfa/xfa_ffdochandler.h"
19 #include "xfa/fxfa/xfa_ffwidgethandler.h" 19 #include "xfa/fxfa/xfa_ffwidgethandler.h"
20 #include "xfa/fxfa/xfa_fontmgr.h" 20 #include "xfa/fxfa/xfa_fontmgr.h"
21 21
22 CXFA_FileRead::CXFA_FileRead(const std::vector<CPDF_Stream*>& streams) { 22 CXFA_FileRead::CXFA_FileRead(const std::vector<CPDF_Stream*>& streams) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void CXFA_FFApp::SetDefaultFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr) { 108 void CXFA_FFApp::SetDefaultFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr) {
109 if (!m_pFontMgr) 109 if (!m_pFontMgr)
110 m_pFontMgr.reset(new CXFA_FontMgr()); 110 m_pFontMgr.reset(new CXFA_FontMgr());
111 m_pFontMgr->SetDefFontMgr(std::move(pFontMgr)); 111 m_pFontMgr->SetDefFontMgr(std::move(pFontMgr));
112 } 112 }
113 113
114 CXFA_FontMgr* CXFA_FFApp::GetXFAFontMgr() const { 114 CXFA_FontMgr* CXFA_FFApp::GetXFAFontMgr() const {
115 return m_pFontMgr.get(); 115 return m_pFontMgr.get();
116 } 116 }
117 117
118 IFGAS_FontMgr* CXFA_FFApp::GetFDEFontMgr() { 118 CFGAS_FontMgr* CXFA_FFApp::GetFDEFontMgr() {
119 if (!m_pFDEFontMgr) { 119 if (!m_pFDEFontMgr) {
120 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 120 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
121 m_pFDEFontMgr = IFGAS_FontMgr::Create(FX_GetDefFontEnumerator()); 121 m_pFDEFontMgr = CFGAS_FontMgr::Create(FX_GetDefFontEnumerator());
122 #else 122 #else
123 m_pFontSource.reset(new CFX_FontSourceEnum_File); 123 m_pFontSource.reset(new CFX_FontSourceEnum_File);
124 m_pFDEFontMgr = IFGAS_FontMgr::Create(m_pFontSource.get()); 124 m_pFDEFontMgr = CFGAS_FontMgr::Create(m_pFontSource.get());
125 #endif 125 #endif
126 } 126 }
127 return m_pFDEFontMgr.get(); 127 return m_pFDEFontMgr.get();
128 } 128 }
129 129
130 CXFA_FWLTheme* CXFA_FFApp::GetFWLTheme() { 130 CXFA_FWLTheme* CXFA_FFApp::GetFWLTheme() {
131 if (!m_pFWLTheme) 131 if (!m_pFWLTheme)
132 m_pFWLTheme.reset(new CXFA_FWLTheme(this)); 132 m_pFWLTheme.reset(new CXFA_FWLTheme(this));
133 return m_pFWLTheme.get(); 133 return m_pFWLTheme.get();
134 } 134 }
135 135
136 CXFA_FWLAdapterWidgetMgr* CXFA_FFApp::GetWidgetMgr( 136 CXFA_FWLAdapterWidgetMgr* CXFA_FFApp::GetWidgetMgr(
137 CFWL_WidgetMgrDelegate* pDelegate) { 137 CFWL_WidgetMgrDelegate* pDelegate) {
138 if (!m_pAdapterWidgetMgr) { 138 if (!m_pAdapterWidgetMgr) {
139 m_pAdapterWidgetMgr.reset(new CXFA_FWLAdapterWidgetMgr); 139 m_pAdapterWidgetMgr.reset(new CXFA_FWLAdapterWidgetMgr);
140 pDelegate->OnSetCapability(FWL_WGTMGR_DisableThread | 140 pDelegate->OnSetCapability(FWL_WGTMGR_DisableThread |
141 FWL_WGTMGR_DisableForm); 141 FWL_WGTMGR_DisableForm);
142 m_pWidgetMgrDelegate = pDelegate; 142 m_pWidgetMgrDelegate = pDelegate;
143 } 143 }
144 return m_pAdapterWidgetMgr.get(); 144 return m_pAdapterWidgetMgr.get();
145 } 145 }
146 146
147 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() const { 147 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() const {
148 return m_pProvider->GetTimerMgr(); 148 return m_pProvider->GetTimerMgr();
149 } 149 }
150 150
151 void CXFA_FFApp::ClearEventTargets() { 151 void CXFA_FFApp::ClearEventTargets() {
152 m_pFWLApp->GetNoteDriver()->ClearEventTargets(false); 152 m_pFWLApp->GetNoteDriver()->ClearEventTargets(false);
153 } 153 }
OLDNEW
« no previous file with comments | « xfa/fwl/theme/cfwl_widgettp.cpp ('k') | xfa/fxfa/app/xfa_fontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698