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

Side by Side Diff: xfa/fwl/core/fwl_appimp.cpp

Issue 2004213002: Remove IWFL_WidgetMgr in favor of CFWL_WidgetMgr (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Explicit ctor Created 4 years, 7 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/core/fwl_appimp.h ('k') | xfa/fwl/core/fwl_formimp.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/fwl/core/fwl_appimp.h" 7 #include "xfa/fwl/core/fwl_appimp.h"
8 8
9 #include "xfa/fwl/core/fwl_noteimp.h" 9 #include "xfa/fwl/core/fwl_noteimp.h"
10 #include "xfa/fwl/core/fwl_widgetmgrimp.h" 10 #include "xfa/fwl/core/fwl_widgetmgrimp.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 FWL_Error IFWL_App::Finalize() { 27 FWL_Error IFWL_App::Finalize() {
28 return static_cast<CFWL_AppImp*>(GetImpl())->Finalize(); 28 return static_cast<CFWL_AppImp*>(GetImpl())->Finalize();
29 } 29 }
30 30
31 CXFA_FFApp* IFWL_App::GetAdapterNative() { 31 CXFA_FFApp* IFWL_App::GetAdapterNative() {
32 return static_cast<CFWL_AppImp*>(GetImpl())->GetAdapterNative(); 32 return static_cast<CFWL_AppImp*>(GetImpl())->GetAdapterNative();
33 } 33 }
34 34
35 IFWL_WidgetMgr* IFWL_App::GetWidgetMgr() { 35 CFWL_WidgetMgr* IFWL_App::GetWidgetMgr() {
36 return static_cast<CFWL_AppImp*>(GetImpl())->GetWidgetMgr(); 36 return static_cast<CFWL_AppImp*>(GetImpl())->GetWidgetMgr();
37 } 37 }
38 38
39 IFWL_ThemeProvider* IFWL_App::GetThemeProvider() { 39 IFWL_ThemeProvider* IFWL_App::GetThemeProvider() {
40 return static_cast<CFWL_AppImp*>(GetImpl())->GetThemeProvider(); 40 return static_cast<CFWL_AppImp*>(GetImpl())->GetThemeProvider();
41 } 41 }
42 42
43 void IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { 43 void IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
44 static_cast<CFWL_AppImp*>(GetImpl())->SetThemeProvider(pThemeProvider); 44 static_cast<CFWL_AppImp*>(GetImpl())->SetThemeProvider(pThemeProvider);
45 } 45 }
(...skipping 23 matching lines...) Expand all
69 return FWL_Error::Succeeded; 69 return FWL_Error::Succeeded;
70 } 70 }
71 FWL_Error CFWL_AppImp::Finalize() { 71 FWL_Error CFWL_AppImp::Finalize() {
72 m_pWidgetMgr.reset(); 72 m_pWidgetMgr.reset();
73 return FWL_Error::Succeeded; 73 return FWL_Error::Succeeded;
74 } 74 }
75 CXFA_FFApp* CFWL_AppImp::GetAdapterNative() const { 75 CXFA_FFApp* CFWL_AppImp::GetAdapterNative() const {
76 return m_pAdapterNative; 76 return m_pAdapterNative;
77 } 77 }
78 CXFA_FWLAdapterWidgetMgr* FWL_GetAdapterWidgetMgr() { 78 CXFA_FWLAdapterWidgetMgr* FWL_GetAdapterWidgetMgr() {
79 return static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()) 79 return CFWL_WidgetMgr::GetInstance()->GetAdapterWidgetMgr();
80 ->GetAdapterWidgetMgr();
81 } 80 }
82 IFWL_WidgetMgr* CFWL_AppImp::GetWidgetMgr() const { 81 CFWL_WidgetMgr* CFWL_AppImp::GetWidgetMgr() const {
83 return m_pWidgetMgr.get(); 82 return m_pWidgetMgr.get();
84 } 83 }
85 84
86 void CFWL_AppImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { 85 void CFWL_AppImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
87 m_pThemeProvider = pThemeProvider; 86 m_pThemeProvider = pThemeProvider;
88 } 87 }
89 88
90 void CFWL_AppImp::Exit(int32_t iExitCode) { 89 void CFWL_AppImp::Exit(int32_t iExitCode) {
91 while (m_pNoteDriver->PopNoteLoop()) { 90 while (m_pNoteDriver->PopNoteLoop()) {
92 continue; 91 continue;
(...skipping 12 matching lines...) Expand all
105 } 104 }
106 105
107 static IFWL_App* g_theApp = nullptr; 106 static IFWL_App* g_theApp = nullptr;
108 IFWL_App* FWL_GetApp() { 107 IFWL_App* FWL_GetApp() {
109 return g_theApp; 108 return g_theApp;
110 } 109 }
111 110
112 void FWL_SetApp(IFWL_App* pApp) { 111 void FWL_SetApp(IFWL_App* pApp) {
113 g_theApp = pApp; 112 g_theApp = pApp;
114 } 113 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/fwl_appimp.h ('k') | xfa/fwl/core/fwl_formimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698