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

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

Issue 1407103006: Move a unique_ptr initialisation out of the initialisation list in fsdk_mgr.cpp (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 void CFX_SystemHandler::KillTimer(int32_t nID) { 203 void CFX_SystemHandler::KillTimer(int32_t nID) {
204 m_pEnv->FFI_KillTimer(nID); 204 m_pEnv->FFI_KillTimer(nID);
205 } 205 }
206 206
207 FX_SYSTEMTIME CFX_SystemHandler::GetLocalTime() { 207 FX_SYSTEMTIME CFX_SystemHandler::GetLocalTime() {
208 return m_pEnv->FFI_GetLocalTime(); 208 return m_pEnv->FFI_GetLocalTime();
209 } 209 }
210 210
211 CPDFDoc_Environment::CPDFDoc_Environment(CPDF_Document* pDoc, 211 CPDFDoc_Environment::CPDFDoc_Environment(CPDF_Document* pDoc,
212 FPDF_FORMFILLINFO* pFFinfo) 212 FPDF_FORMFILLINFO* pFFinfo)
213 : m_pInfo(pFFinfo), 213 : m_pInfo(pFFinfo), m_pSDKDoc(NULL), m_pPDFDoc(pDoc) {
214 m_pSDKDoc(NULL), 214 m_pSysHandler.reset(new CFX_SystemHandler(this));
215 m_pPDFDoc(pDoc),
216 m_pSysHandler(new CFX_SystemHandler(this)) {
217 } 215 }
218 216
219 CPDFDoc_Environment::~CPDFDoc_Environment() { 217 CPDFDoc_Environment::~CPDFDoc_Environment() {
220 } 218 }
221 219
222 int CPDFDoc_Environment::JS_appAlert(const FX_WCHAR* Msg, 220 int CPDFDoc_Environment::JS_appAlert(const FX_WCHAR* Msg,
223 const FX_WCHAR* Title, 221 const FX_WCHAR* Title,
224 FX_UINT Type, 222 FX_UINT Type,
225 FX_UINT Icon) { 223 FX_UINT Icon) {
226 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_alert) { 224 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_alert) {
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); 930 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot();
933 if (!pFocusAnnot) 931 if (!pFocusAnnot)
934 return nullptr; 932 return nullptr;
935 933
936 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { 934 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) {
937 if (pAnnot == pFocusAnnot) 935 if (pAnnot == pFocusAnnot)
938 return pAnnot; 936 return pAnnot;
939 } 937 }
940 return nullptr; 938 return nullptr;
941 } 939 }
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