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

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

Issue 1887703003: Fold the FWL NoteThread classes up to the Thread classes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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/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_targetimp.h" 10 #include "xfa/fwl/core/fwl_targetimp.h"
(...skipping 24 matching lines...) Expand all
35 return static_cast<CFWL_AppImp*>(GetImpl())->GetThemeProvider(); 35 return static_cast<CFWL_AppImp*>(GetImpl())->GetThemeProvider();
36 } 36 }
37 FWL_ERR IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { 37 FWL_ERR IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
38 return static_cast<CFWL_AppImp*>(GetImpl())->SetThemeProvider(pThemeProvider); 38 return static_cast<CFWL_AppImp*>(GetImpl())->SetThemeProvider(pThemeProvider);
39 } 39 }
40 FWL_ERR IFWL_App::Exit(int32_t iExitCode) { 40 FWL_ERR IFWL_App::Exit(int32_t iExitCode) {
41 return static_cast<CFWL_AppImp*>(GetImpl())->Exit(iExitCode); 41 return static_cast<CFWL_AppImp*>(GetImpl())->Exit(iExitCode);
42 } 42 }
43 43
44 CFWL_AppImp::CFWL_AppImp(IFWL_App* pIface, IFWL_AdapterNative* pAdapter) 44 CFWL_AppImp::CFWL_AppImp(IFWL_App* pIface, IFWL_AdapterNative* pAdapter)
45 : CFWL_NoteThreadImp(pIface), 45 : CFWL_ThreadImp(pIface),
46 m_pAdapterNative(pAdapter), 46 m_pAdapterNative(pAdapter),
47 m_pThemeProvider(nullptr) {} 47 m_pThemeProvider(nullptr) {}
48 48
49 CFWL_AppImp::~CFWL_AppImp() { 49 CFWL_AppImp::~CFWL_AppImp() {
50 CFWL_ToolTipContainer::DeleteInstance(); 50 CFWL_ToolTipContainer::DeleteInstance();
51 } 51 }
52 52
53 FWL_ERR CFWL_AppImp::Initialize() { 53 FWL_ERR CFWL_AppImp::Initialize() {
54 if (!m_pWidgetMgr) { 54 if (!m_pWidgetMgr) {
55 m_pWidgetMgr.reset(new CFWL_WidgetMgr(m_pAdapterNative)); 55 m_pWidgetMgr.reset(new CFWL_WidgetMgr(m_pAdapterNative));
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 static IFWL_App* _theApp = NULL; 95 static IFWL_App* _theApp = NULL;
96 IFWL_App* FWL_GetApp() { 96 IFWL_App* FWL_GetApp() {
97 return _theApp; 97 return _theApp;
98 } 98 }
99 void FWL_SetApp(IFWL_App* pApp) { 99 void FWL_SetApp(IFWL_App* pApp) {
100 _theApp = pApp; 100 _theApp = pApp;
101 } 101 }
102 FWL_ERR FWL_SetFullScreen(IFWL_Widget* pWidget, FX_BOOL bFullScreen) { 102 FWL_ERR FWL_SetFullScreen(IFWL_Widget* pWidget, FX_BOOL bFullScreen) {
103 if (!pWidget) 103 if (!pWidget)
104 return FWL_ERR_Succeeded; 104 return FWL_ERR_Succeeded;
105 IFWL_NoteThread* pNoteTread = pWidget->GetOwnerThread(); 105 IFWL_Thread* pNoteTread = pWidget->GetOwnerThread();
106 if (!pNoteTread) 106 if (!pNoteTread)
107 return FWL_ERR_Succeeded; 107 return FWL_ERR_Succeeded;
108 CFWL_NoteDriver* pNoteDriver = 108 CFWL_NoteDriver* pNoteDriver =
109 static_cast<CFWL_NoteDriver*>(pNoteTread->GetNoteDriver()); 109 static_cast<CFWL_NoteDriver*>(pNoteTread->GetNoteDriver());
110 if (!pNoteTread) 110 if (!pNoteTread)
111 return FWL_ERR_Succeeded; 111 return FWL_ERR_Succeeded;
112 pNoteDriver->NotifyFullScreenMode(pWidget, bFullScreen); 112 pNoteDriver->NotifyFullScreenMode(pWidget, bFullScreen);
113 return FWL_GetAdapterWidgetMgr()->SetFullScreen(pWidget, bFullScreen); 113 return FWL_GetAdapterWidgetMgr()->SetFullScreen(pWidget, bFullScreen);
114 } 114 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698