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

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 1383783003: Roll PDFium revision to 3dedace and use the new init API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 221c7e889acf722832abbe873297e619f05c2a6e..369aa206b3d54ee0eec04ad5df5c28d84f2d786b 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -591,7 +591,12 @@ std::string GetDocumentMetadata(FPDF_DOCUMENT doc, const std::string& key) {
} // namespace
bool InitializeSDK() {
- FPDF_InitLibrary();
+ FPDF_LIBRARY_CONFIG config;
+ config.version = 2;
+ config.m_pUserFontPaths = nullptr;
+ config.m_pIsolate = v8::Isolate::GetCurrent();
Tom Sepez 2015/10/03 01:07:13 What do we give up if we pass a nullptr here, forc
Lei Zhang 2015/10/03 01:09:05 Possibly just giving up some efficiency, but local
+ config.m_v8EmbedderSlot = gin::kEmbedderPDFium;
+ FPDF_InitLibraryWithConfig(&config);
#if defined(OS_LINUX)
// Font loading doesn't work in the renderer sandbox in Linux.
@@ -690,7 +695,7 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Client* client)
FPDF_FORMFILLINFO::FFI_GotoURL = Form_GotoURL;
FPDF_FORMFILLINFO::FFI_GetLanguage = Form_GetLanguage;
#endif // PDF_USE_XFA
- IPDF_JSPLATFORM::version = 2;
+ IPDF_JSPLATFORM::version = 3;
IPDF_JSPLATFORM::app_alert = Form_Alert;
IPDF_JSPLATFORM::app_beep = Form_Beep;
IPDF_JSPLATFORM::app_response = Form_Response;
@@ -700,8 +705,6 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Client* client)
IPDF_JSPLATFORM::Doc_submitForm = Form_SubmitForm;
IPDF_JSPLATFORM::Doc_gotoPage = Form_GotoPage;
IPDF_JSPLATFORM::Field_browse = Form_Browse;
- IPDF_JSPLATFORM::m_isolate = v8::Isolate::GetCurrent();
- IPDF_JSPLATFORM::m_v8EmbedderSlot = gin::kEmbedderPDFium;
IFSDK_PAUSE::version = 1;
IFSDK_PAUSE::user = NULL;
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698