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

Side by Side Diff: fpdfsdk/src/fsdk_mgr.cpp

Issue 1412793013: Merge to XFA: Move a unique_ptr initialisation out of the initialisation list in fsdk_mgr.cpp (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "../../public/fpdf_ext.h" 9 #include "../../public/fpdf_ext.h"
10 #include "../../third_party/base/nonstd_unique_ptr.h" 10 #include "../../third_party/base/nonstd_unique_ptr.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void CFX_SystemHandler::KillTimer(int32_t nID) { 204 void CFX_SystemHandler::KillTimer(int32_t nID) {
205 m_pEnv->FFI_KillTimer(nID); 205 m_pEnv->FFI_KillTimer(nID);
206 } 206 }
207 207
208 FX_SYSTEMTIME CFX_SystemHandler::GetLocalTime() { 208 FX_SYSTEMTIME CFX_SystemHandler::GetLocalTime() {
209 return m_pEnv->FFI_GetLocalTime(); 209 return m_pEnv->FFI_GetLocalTime();
210 } 210 }
211 211
212 CPDFDoc_Environment::CPDFDoc_Environment(CPDFXFA_Document* pDoc, 212 CPDFDoc_Environment::CPDFDoc_Environment(CPDFXFA_Document* pDoc,
213 FPDF_FORMFILLINFO* pFFinfo) 213 FPDF_FORMFILLINFO* pFFinfo)
214 : m_pInfo(pFFinfo), 214 : m_pInfo(pFFinfo), m_pSDKDoc(NULL), m_pXFADoc(pDoc) {
215 m_pSDKDoc(NULL), 215 m_pSysHandler.reset(new CFX_SystemHandler(this));
216 m_pXFADoc(pDoc),
217 m_pSysHandler(new CFX_SystemHandler(this)) {
218 } 216 }
219 217
220 CPDFDoc_Environment::~CPDFDoc_Environment() { 218 CPDFDoc_Environment::~CPDFDoc_Environment() {
221 CPDFXFA_App* pProvider = CPDFXFA_App::GetInstance(); 219 CPDFXFA_App* pProvider = CPDFXFA_App::GetInstance();
222 if (pProvider->m_pEnvList.GetSize() == 0) 220 if (pProvider->m_pEnvList.GetSize() == 0)
223 pProvider->SetJavaScriptInitialized(FALSE); 221 pProvider->SetJavaScriptInitialized(FALSE);
224 } 222 }
225 223
226 int CPDFDoc_Environment::JS_appAlert(const FX_WCHAR* Msg, 224 int CPDFDoc_Environment::JS_appAlert(const FX_WCHAR* Msg,
227 const FX_WCHAR* Title, 225 const FX_WCHAR* Title,
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); 1110 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot();
1113 if (!pFocusAnnot) 1111 if (!pFocusAnnot)
1114 return nullptr; 1112 return nullptr;
1115 1113
1116 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { 1114 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) {
1117 if (pAnnot == pFocusAnnot) 1115 if (pAnnot == pFocusAnnot)
1118 return pAnnot; 1116 return pAnnot;
1119 } 1117 }
1120 return nullptr; 1118 return nullptr;
1121 } 1119 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698