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

Side by Side Diff: fpdfsdk/fpdfxfa/fpdfxfa_app.cpp

Issue 2386273004: Add ptr_util.h from base until std::make_unique<> available (Closed)
Patch Set: 2016 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
« no previous file with comments | « fpdfsdk/fpdfview.cpp ('k') | fpdfsdk/fpdfxfa/fpdfxfa_page.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 "fpdfsdk/fpdfxfa/fpdfxfa_app.h" 7 #include "fpdfsdk/fpdfxfa/fpdfxfa_app.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
11 #include "fpdfsdk/cpdfsdk_environment.h" 11 #include "fpdfsdk/cpdfsdk_environment.h"
12 #include "fpdfsdk/fpdfxfa/fpdfxfa_util.h" 12 #include "fpdfsdk/fpdfxfa/fpdfxfa_util.h"
13 #include "fpdfsdk/fsdk_define.h" 13 #include "fpdfsdk/fsdk_define.h"
14 #include "third_party/base/ptr_util.h"
14 #include "xfa/fxbarcode/BC_Library.h" 15 #include "xfa/fxbarcode/BC_Library.h"
15 #include "xfa/fxfa/xfa_ffapp.h" 16 #include "xfa/fxfa/xfa_ffapp.h"
16 #include "xfa/fxfa/xfa_fontmgr.h" 17 #include "xfa/fxfa/xfa_fontmgr.h"
17 18
18 namespace { 19 namespace {
19 20
20 CPDFXFA_App* g_pApp = nullptr; 21 CPDFXFA_App* g_pApp = nullptr;
21 22
22 } // namespace 23 } // namespace
23 24
(...skipping 25 matching lines...) Expand all
49 } 50 }
50 51
51 FX_BOOL CPDFXFA_App::Initialize(v8::Isolate* pIsolate) { 52 FX_BOOL CPDFXFA_App::Initialize(v8::Isolate* pIsolate) {
52 BC_Library_Init(); 53 BC_Library_Init();
53 FXJSE_Initialize(); 54 FXJSE_Initialize();
54 55
55 m_pIsolate = pIsolate ? pIsolate : FXJSE_Runtime_Create_Own(); 56 m_pIsolate = pIsolate ? pIsolate : FXJSE_Runtime_Create_Own();
56 if (!m_pIsolate) 57 if (!m_pIsolate)
57 return FALSE; 58 return FALSE;
58 59
59 m_pXFAApp = WrapUnique(new CXFA_FFApp(this)); 60 m_pXFAApp = pdfium::MakeUnique<CXFA_FFApp>(this);
60 m_pXFAApp->SetDefaultFontMgr( 61 m_pXFAApp->SetDefaultFontMgr(
61 std::unique_ptr<CXFA_DefFontMgr>(new CXFA_DefFontMgr)); 62 std::unique_ptr<CXFA_DefFontMgr>(new CXFA_DefFontMgr));
62 63
63 return TRUE; 64 return TRUE;
64 } 65 }
65 66
66 FX_BOOL CPDFXFA_App::AddFormFillEnv(CPDFSDK_Environment* pEnv) { 67 FX_BOOL CPDFXFA_App::AddFormFillEnv(CPDFSDK_Environment* pEnv) {
67 if (!pEnv) 68 if (!pEnv)
68 return FALSE; 69 return FALSE;
69 70
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } 332 }
332 } 333 }
333 334
334 IFWL_AdapterTimerMgr* CPDFXFA_App::GetTimerMgr() { 335 IFWL_AdapterTimerMgr* CPDFXFA_App::GetTimerMgr() {
335 CXFA_FWLAdapterTimerMgr* pAdapter = nullptr; 336 CXFA_FWLAdapterTimerMgr* pAdapter = nullptr;
336 CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); 337 CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
337 if (pEnv) 338 if (pEnv)
338 pAdapter = new CXFA_FWLAdapterTimerMgr(pEnv); 339 pAdapter = new CXFA_FWLAdapterTimerMgr(pEnv);
339 return pAdapter; 340 return pAdapter;
340 } 341 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfview.cpp ('k') | fpdfsdk/fpdfxfa/fpdfxfa_page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698