diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 00:07:34 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 00:07:34 +0000 |
commit | 6449aad1374e9d43a0ebd1d1c6eaccffc9ab6e4d (patch) | |
tree | 6e9052d2cf99bb69200decdee3a5c8c57e29b209 /chrome/renderer/render_process_impl.cc | |
parent | ad938578ef158f52490ddc978579b7986753eda0 (diff) | |
download | chromium_src-6449aad1374e9d43a0ebd1d1c6eaccffc9ab6e4d.zip chromium_src-6449aad1374e9d43a0ebd1d1c6eaccffc9ab6e4d.tar.gz chromium_src-6449aad1374e9d43a0ebd1d1c6eaccffc9ab6e4d.tar.bz2 |
Load Pepper v2 internal pdf plugin.
Review URL: http://codereview.chromium.org/2891016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52575 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_process_impl.cc')
-rw-r--r-- | chrome/renderer/render_process_impl.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc index b1b6bc6..e610df9 100644 --- a/chrome/renderer/render_process_impl.cc +++ b/chrome/renderer/render_process_impl.cc @@ -180,27 +180,15 @@ RenderProcessImpl::RenderProcessImpl() } #endif -#if defined(OS_WIN) || defined(OS_MACOSX) - // Load the pdf plugin before the sandbox is turned on. This is for Mac and - // Windows. On Linux, this needs to be done in the zygote process. +#if defined(OS_WIN) + // Need to patch a few functions for font loading to work correctly. FilePath pdf; if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && file_util::PathExists(pdf)) { - static scoped_refptr<NPAPI::PluginLib> pdf_lib = - NPAPI::PluginLib::CreatePluginLib(pdf); - bool rv = pdf_lib && pdf_lib->EnsureAlwaysLoaded(); - DCHECK(rv) << "Couldn't load PDF plugin"; - -#if defined(OS_WIN) - if (rv) { - g_iat_patch_createdca.Patch( - pdf_lib->plugin_info().path.value().c_str(), - "gdi32.dll", "CreateDCA", CreateDCAPatch); - g_iat_patch_get_font_data.Patch( - pdf_lib->plugin_info().path.value().c_str(), - "gdi32.dll", "GetFontData", GetFontDataPatch); - } -#endif + g_iat_patch_createdca.Patch( + pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); + g_iat_patch_get_font_data.Patch( + pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch); } #endif } |