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

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

Issue 2436103002: Remove FWL globals. (Closed)
Patch Set: Review feedback 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/ifwl_widgetdelegate.h ('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/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/fgas_stdfontmgr.h"
13 #include "xfa/fwl/core/fwl_noteimp.h"
13 #include "xfa/fwl/core/cfwl_widgetmgr.h" 14 #include "xfa/fwl/core/cfwl_widgetmgr.h"
14 #include "xfa/fxfa/app/xfa_fwladapter.h" 15 #include "xfa/fxfa/app/xfa_fwladapter.h"
15 #include "xfa/fxfa/app/xfa_fwltheme.h" 16 #include "xfa/fxfa/app/xfa_fwltheme.h"
16 #include "xfa/fxfa/xfa_ffdoc.h" 17 #include "xfa/fxfa/xfa_ffdoc.h"
17 #include "xfa/fxfa/xfa_ffdochandler.h" 18 #include "xfa/fxfa/xfa_ffdochandler.h"
18 #include "xfa/fxfa/xfa_ffwidgethandler.h" 19 #include "xfa/fxfa/xfa_ffwidgethandler.h"
19 #include "xfa/fxfa/xfa_fontmgr.h" 20 #include "xfa/fxfa/xfa_fontmgr.h"
20 21
21 CXFA_FileRead::CXFA_FileRead(const std::vector<CPDF_Stream*>& streams) { 22 CXFA_FileRead::CXFA_FileRead(const std::vector<CPDF_Stream*>& streams) {
22 for (CPDF_Stream* pStream : streams) { 23 for (CPDF_Stream* pStream : streams) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 67 }
67 68
68 void CXFA_FileRead::Release() { 69 void CXFA_FileRead::Release() {
69 delete this; 70 delete this;
70 } 71 }
71 72
72 CXFA_FFApp::CXFA_FFApp(IXFA_AppProvider* pProvider) 73 CXFA_FFApp::CXFA_FFApp(IXFA_AppProvider* pProvider)
73 : m_pProvider(pProvider), 74 : m_pProvider(pProvider),
74 m_pWidgetMgrDelegate(nullptr), 75 m_pWidgetMgrDelegate(nullptr),
75 m_pFWLApp(new IFWL_App(this)) { 76 m_pFWLApp(new IFWL_App(this)) {
76 FWL_SetApp(m_pFWLApp.get());
77 CXFA_TimeZoneProvider::Create(); 77 CXFA_TimeZoneProvider::Create();
78 } 78 }
79 79
80 CXFA_FFApp::~CXFA_FFApp() { 80 CXFA_FFApp::~CXFA_FFApp() {
81 CXFA_TimeZoneProvider::Destroy(); 81 CXFA_TimeZoneProvider::Destroy();
82 } 82 }
83 83
84 CXFA_FFDocHandler* CXFA_FFApp::GetDocHandler() { 84 CXFA_FFDocHandler* CXFA_FFApp::GetDocHandler() {
85 if (!m_pDocHandler) 85 if (!m_pDocHandler)
86 m_pDocHandler.reset(new CXFA_FFDocHandler); 86 m_pDocHandler.reset(new CXFA_FFDocHandler);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
151 void CXFA_FFApp::ClearEventTargets() {
152 m_pFWLApp->GetNoteDriver()->ClearEventTargets(FALSE);
153 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_widgetdelegate.h ('k') | xfa/fxfa/app/xfa_ffbarcode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698