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

Side by Side Diff: fpdfsdk/cpdfsdk_document.cpp

Issue 2397723005: Convert CPDFSDK_InterForm to take a CPDFSDK_FormFillEnvironment (Closed)
Patch Set: Rebase to master 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 | « no previous file | fpdfsdk/cpdfsdk_interform.h » ('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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/cpdfsdk_document.h" 7 #include "fpdfsdk/cpdfsdk_document.h"
8 8
9 #include "core/fpdfapi/parser/cpdf_array.h" 9 #include "core/fpdfapi/parser/cpdf_array.h"
10 #include "core/fpdfapi/parser/cpdf_dictionary.h" 10 #include "core/fpdfapi/parser/cpdf_dictionary.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 delete pPageView; 156 delete pPageView;
157 } 157 }
158 158
159 UnderlyingPageType* CPDFSDK_Document::GetPage(int nIndex) { 159 UnderlyingPageType* CPDFSDK_Document::GetPage(int nIndex) {
160 return UnderlyingFromFPDFPage(m_pEnv->GetPage(m_pDoc, nIndex)); 160 return UnderlyingFromFPDFPage(m_pEnv->GetPage(m_pDoc, nIndex));
161 } 161 }
162 162
163 CPDFSDK_InterForm* CPDFSDK_Document::GetInterForm() { 163 CPDFSDK_InterForm* CPDFSDK_Document::GetInterForm() {
164 if (!m_pInterForm) 164 if (!m_pInterForm)
165 m_pInterForm = pdfium::MakeUnique<CPDFSDK_InterForm>(this); 165 m_pInterForm = pdfium::MakeUnique<CPDFSDK_InterForm>(GetEnv());
166 return m_pInterForm.get(); 166 return m_pInterForm.get();
167 } 167 }
168 168
169 void CPDFSDK_Document::UpdateAllViews(CPDFSDK_PageView* pSender, 169 void CPDFSDK_Document::UpdateAllViews(CPDFSDK_PageView* pSender,
170 CPDFSDK_Annot* pAnnot) { 170 CPDFSDK_Annot* pAnnot) {
171 for (const auto& it : m_pageMap) { 171 for (const auto& it : m_pageMap) {
172 CPDFSDK_PageView* pPageView = it.second; 172 CPDFSDK_PageView* pPageView = it.second;
173 if (pPageView != pSender) 173 if (pPageView != pSender)
174 pPageView->UpdateView(pAnnot); 174 pPageView->UpdateView(pAnnot);
175 } 175 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 return GetPDFDocument()->GetUserPermissions() & nFlag; 246 return GetPDFDocument()->GetUserPermissions() & nFlag;
247 } 247 }
248 248
249 IJS_Runtime* CPDFSDK_Document::GetJsRuntime() { 249 IJS_Runtime* CPDFSDK_Document::GetJsRuntime() {
250 return m_pEnv->GetJSRuntime(); 250 return m_pEnv->GetJSRuntime();
251 } 251 }
252 252
253 CFX_WideString CPDFSDK_Document::GetPath() { 253 CFX_WideString CPDFSDK_Document::GetPath() {
254 return m_pEnv->JS_docGetFilePath(); 254 return m_pEnv->JS_docGetFilePath();
255 } 255 }
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/cpdfsdk_interform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698