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

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

Issue 2430563003: Merge IFWL_App and FWL_AppImp together (Closed)
Patch Set: Cleanup Created 4 years, 2 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
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "xfa/fwl/core/ifwl_app.h"
8
9 #include "third_party/base/ptr_util.h"
10 #include "xfa/fwl/core/cfwl_widgetmgr.h"
11 #include "xfa/fwl/core/fwl_noteimp.h"
12 #include "xfa/fwl/core/ifwl_widget.h"
13 #include "xfa/fxfa/app/xfa_fwladapter.h"
14
15 CXFA_FWLAdapterWidgetMgr* FWL_GetAdapterWidgetMgr() {
16 return CFWL_WidgetMgr::GetInstance()->GetAdapterWidgetMgr();
17 }
18
19 CXFA_FFApp* FWL_GetAdapterNative() {
20 IFWL_App* pApp = FWL_GetApp();
21 if (!pApp)
22 return nullptr;
23 return pApp->GetAdapterNative();
24 }
25
26 static IFWL_App* g_theApp = nullptr;
27 IFWL_App* FWL_GetApp() {
28 return g_theApp;
29 }
30
31 void FWL_SetApp(IFWL_App* pApp) {
32 g_theApp = pApp;
33 }
34
35 IFWL_App::IFWL_App(CXFA_FFApp* pAdapter)
36 : m_pAdapterNative(pAdapter),
37 m_pWidgetMgr(pdfium::MakeUnique<CFWL_WidgetMgr>(pAdapter)),
38 m_pNoteDriver(pdfium::MakeUnique<CFWL_NoteDriver>()) {}
39
40 IFWL_App::~IFWL_App() {
41 CFWL_ToolTipContainer::DeleteInstance();
42 }
43
44 CXFA_FFApp* IFWL_App::GetAdapterNative() {
45 return m_pAdapterNative;
46 }
47
48 CFWL_WidgetMgr* IFWL_App::GetWidgetMgr() {
49 return m_pWidgetMgr.get();
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698