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

Unified Diff: xfa/src/fwl/src/core/fwl_appimp.cpp

Issue 1636873004: XFA: Fix DOS newlines (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: All of them Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/src/fwl/src/basewidget/include/fxmath_barcodeimp.h ('k') | xfa/src/fwl/src/core/fwl_contentimp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fwl/src/core/fwl_appimp.cpp
diff --git a/xfa/src/fwl/src/core/fwl_appimp.cpp b/xfa/src/fwl/src/core/fwl_appimp.cpp
index 9ea3e766a6dfd070913af441ebd9403c03faa32a..a9d8e2834e2876ee9dd8d59564ea24d9b0fd337a 100644
--- a/xfa/src/fwl/src/core/fwl_appimp.cpp
+++ b/xfa/src/fwl/src/core/fwl_appimp.cpp
@@ -1,123 +1,123 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "xfa/src/foxitlib.h"
-#include "xfa/src/fwl/src/core/include/fwl_targetimp.h"
-#include "xfa/src/fwl/src/core/include/fwl_threadimp.h"
-#include "xfa/src/fwl/src/core/include/fwl_noteimp.h"
-#include "xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h"
-#include "xfa/src/fwl/src/core/include/fwl_appimp.h"
-
-IFWL_App* IFWL_App::Create(IFWL_AdapterNative* pAdapter) {
- IFWL_App* pApp = new IFWL_App;
- pApp->SetImpl(new CFWL_AppImp(pApp, pAdapter));
- return pApp;
-}
-FWL_ERR IFWL_App::Initialize() {
- return static_cast<CFWL_AppImp*>(GetImpl())->Initialize();
-}
-FWL_ERR IFWL_App::Finalize() {
- return static_cast<CFWL_AppImp*>(GetImpl())->Finalize();
-}
-IFWL_AdapterNative* IFWL_App::GetAdapterNative() {
- return static_cast<CFWL_AppImp*>(GetImpl())->GetAdapterNative();
-}
-IFWL_WidgetMgr* IFWL_App::GetWidgetMgr() {
- return static_cast<CFWL_AppImp*>(GetImpl())->GetWidgetMgr();
-}
-IFWL_ThemeProvider* IFWL_App::GetThemeProvider() {
- return static_cast<CFWL_AppImp*>(GetImpl())->GetThemeProvider();
-}
-FWL_ERR IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
- return static_cast<CFWL_AppImp*>(GetImpl())->SetThemeProvider(pThemeProvider);
-}
-FWL_ERR IFWL_App::Exit(int32_t iExitCode) {
- return static_cast<CFWL_AppImp*>(GetImpl())->Exit(iExitCode);
-}
-
-CFWL_AppImp::CFWL_AppImp(IFWL_App* pIface, IFWL_AdapterNative* pAdapter)
- : CFWL_NoteThreadImp(pIface), m_pWidgetMgr(NULL), m_pThemeProvider(NULL) {
- if (!pAdapter) {
- pAdapter = FWL_CreateFuelAdapterNative();
- m_bFuelAdapter = TRUE;
- } else {
- m_bFuelAdapter = FALSE;
- }
- m_pAdapterNative = pAdapter;
-}
-CFWL_AppImp::~CFWL_AppImp() {
- CFWL_ToolTipContainer::DeleteInstance();
- if (m_bFuelAdapter) {
- FWL_ReleaseFuelAdapterNative(m_pAdapterNative);
- m_pAdapterNative = NULL;
- }
- if (m_pWidgetMgr) {
- delete m_pWidgetMgr;
- m_pWidgetMgr = NULL;
- }
-}
-FWL_ERR CFWL_AppImp::Initialize() {
- if (!m_pWidgetMgr) {
- m_pWidgetMgr = new CFWL_WidgetMgr(m_pAdapterNative);
- }
- return FWL_ERR_Succeeded;
-}
-FWL_ERR CFWL_AppImp::Finalize() {
- delete m_pWidgetMgr;
- m_pWidgetMgr = NULL;
- return FWL_ERR_Succeeded;
-}
-IFWL_AdapterNative* CFWL_AppImp::GetAdapterNative() {
- return m_pAdapterNative;
-}
-IFWL_AdapterWidgetMgr* FWL_GetAdapterWidgetMgr() {
- return static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr())
- ->GetAdapterWidgetMgr();
-}
-IFWL_WidgetMgr* CFWL_AppImp::GetWidgetMgr() {
- return m_pWidgetMgr;
-}
-FWL_ERR CFWL_AppImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
- m_pThemeProvider = pThemeProvider;
- return FWL_ERR_Succeeded;
-}
-FWL_ERR CFWL_AppImp::Exit(int32_t iExitCode) {
- while (m_pNoteDriver->PopNoteLoop())
- ;
- return m_pWidgetMgr->GetAdapterWidgetMgr()->Exit(0);
-}
-IFWL_ThemeProvider* CFWL_AppImp::GetThemeProvider() {
- return m_pThemeProvider;
-}
-IFWL_AdapterNative* FWL_GetAdapterNative() {
- IFWL_App* pApp = FWL_GetApp();
- if (!pApp)
- return NULL;
- return pApp->GetAdapterNative();
-}
-IFWL_ThemeProvider* FWL_GetThemeProvider() {
- return NULL;
-}
-static IFWL_App* _theApp = NULL;
-IFWL_App* FWL_GetApp() {
- return _theApp;
-}
-void FWL_SetApp(IFWL_App* pApp) {
- _theApp = pApp;
-}
-FWL_ERR FWL_SetFullScreen(IFWL_Widget* pWidget, FX_BOOL bFullScreen) {
- if (!pWidget)
- return FWL_ERR_Succeeded;
- IFWL_NoteThread* pNoteTread = pWidget->GetOwnerThread();
- if (!pNoteTread)
- return FWL_ERR_Succeeded;
- CFWL_NoteDriver* pNoteDriver =
- static_cast<CFWL_NoteDriver*>(pNoteTread->GetNoteDriver());
- if (!pNoteTread)
- return FWL_ERR_Succeeded;
- pNoteDriver->NotifyFullScreenMode(pWidget, bFullScreen);
- return FWL_GetAdapterWidgetMgr()->SetFullScreen(pWidget, bFullScreen);
-}
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#include "xfa/src/foxitlib.h"
+#include "xfa/src/fwl/src/core/include/fwl_targetimp.h"
+#include "xfa/src/fwl/src/core/include/fwl_threadimp.h"
+#include "xfa/src/fwl/src/core/include/fwl_noteimp.h"
+#include "xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h"
+#include "xfa/src/fwl/src/core/include/fwl_appimp.h"
+
+IFWL_App* IFWL_App::Create(IFWL_AdapterNative* pAdapter) {
+ IFWL_App* pApp = new IFWL_App;
+ pApp->SetImpl(new CFWL_AppImp(pApp, pAdapter));
+ return pApp;
+}
+FWL_ERR IFWL_App::Initialize() {
+ return static_cast<CFWL_AppImp*>(GetImpl())->Initialize();
+}
+FWL_ERR IFWL_App::Finalize() {
+ return static_cast<CFWL_AppImp*>(GetImpl())->Finalize();
+}
+IFWL_AdapterNative* IFWL_App::GetAdapterNative() {
+ return static_cast<CFWL_AppImp*>(GetImpl())->GetAdapterNative();
+}
+IFWL_WidgetMgr* IFWL_App::GetWidgetMgr() {
+ return static_cast<CFWL_AppImp*>(GetImpl())->GetWidgetMgr();
+}
+IFWL_ThemeProvider* IFWL_App::GetThemeProvider() {
+ return static_cast<CFWL_AppImp*>(GetImpl())->GetThemeProvider();
+}
+FWL_ERR IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
+ return static_cast<CFWL_AppImp*>(GetImpl())->SetThemeProvider(pThemeProvider);
+}
+FWL_ERR IFWL_App::Exit(int32_t iExitCode) {
+ return static_cast<CFWL_AppImp*>(GetImpl())->Exit(iExitCode);
+}
+
+CFWL_AppImp::CFWL_AppImp(IFWL_App* pIface, IFWL_AdapterNative* pAdapter)
+ : CFWL_NoteThreadImp(pIface), m_pWidgetMgr(NULL), m_pThemeProvider(NULL) {
+ if (!pAdapter) {
+ pAdapter = FWL_CreateFuelAdapterNative();
+ m_bFuelAdapter = TRUE;
+ } else {
+ m_bFuelAdapter = FALSE;
+ }
+ m_pAdapterNative = pAdapter;
+}
+CFWL_AppImp::~CFWL_AppImp() {
+ CFWL_ToolTipContainer::DeleteInstance();
+ if (m_bFuelAdapter) {
+ FWL_ReleaseFuelAdapterNative(m_pAdapterNative);
+ m_pAdapterNative = NULL;
+ }
+ if (m_pWidgetMgr) {
+ delete m_pWidgetMgr;
+ m_pWidgetMgr = NULL;
+ }
+}
+FWL_ERR CFWL_AppImp::Initialize() {
+ if (!m_pWidgetMgr) {
+ m_pWidgetMgr = new CFWL_WidgetMgr(m_pAdapterNative);
+ }
+ return FWL_ERR_Succeeded;
+}
+FWL_ERR CFWL_AppImp::Finalize() {
+ delete m_pWidgetMgr;
+ m_pWidgetMgr = NULL;
+ return FWL_ERR_Succeeded;
+}
+IFWL_AdapterNative* CFWL_AppImp::GetAdapterNative() {
+ return m_pAdapterNative;
+}
+IFWL_AdapterWidgetMgr* FWL_GetAdapterWidgetMgr() {
+ return static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr())
+ ->GetAdapterWidgetMgr();
+}
+IFWL_WidgetMgr* CFWL_AppImp::GetWidgetMgr() {
+ return m_pWidgetMgr;
+}
+FWL_ERR CFWL_AppImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
+ m_pThemeProvider = pThemeProvider;
+ return FWL_ERR_Succeeded;
+}
+FWL_ERR CFWL_AppImp::Exit(int32_t iExitCode) {
+ while (m_pNoteDriver->PopNoteLoop())
+ ;
+ return m_pWidgetMgr->GetAdapterWidgetMgr()->Exit(0);
+}
+IFWL_ThemeProvider* CFWL_AppImp::GetThemeProvider() {
+ return m_pThemeProvider;
+}
+IFWL_AdapterNative* FWL_GetAdapterNative() {
+ IFWL_App* pApp = FWL_GetApp();
+ if (!pApp)
+ return NULL;
+ return pApp->GetAdapterNative();
+}
+IFWL_ThemeProvider* FWL_GetThemeProvider() {
+ return NULL;
+}
+static IFWL_App* _theApp = NULL;
+IFWL_App* FWL_GetApp() {
+ return _theApp;
+}
+void FWL_SetApp(IFWL_App* pApp) {
+ _theApp = pApp;
+}
+FWL_ERR FWL_SetFullScreen(IFWL_Widget* pWidget, FX_BOOL bFullScreen) {
+ if (!pWidget)
+ return FWL_ERR_Succeeded;
+ IFWL_NoteThread* pNoteTread = pWidget->GetOwnerThread();
+ if (!pNoteTread)
+ return FWL_ERR_Succeeded;
+ CFWL_NoteDriver* pNoteDriver =
+ static_cast<CFWL_NoteDriver*>(pNoteTread->GetNoteDriver());
+ if (!pNoteTread)
+ return FWL_ERR_Succeeded;
+ pNoteDriver->NotifyFullScreenMode(pWidget, bFullScreen);
+ return FWL_GetAdapterWidgetMgr()->SetFullScreen(pWidget, bFullScreen);
+}
« no previous file with comments | « xfa/src/fwl/src/basewidget/include/fxmath_barcodeimp.h ('k') | xfa/src/fwl/src/core/fwl_contentimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698