diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-13 03:36:30 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-13 03:36:30 +0000 |
commit | 88bec0e4d832ae7fd27ad1610d5f8e4e46e3b06a (patch) | |
tree | f49a620e8b05881b64488eb6876080e97d080dad /chrome | |
parent | 603c0ff53fbad528646ff0577f940b3bc5a33912 (diff) | |
download | chromium_src-88bec0e4d832ae7fd27ad1610d5f8e4e46e3b06a.zip chromium_src-88bec0e4d832ae7fd27ad1610d5f8e4e46e3b06a.tar.gz chromium_src-88bec0e4d832ae7fd27ad1610d5f8e4e46e3b06a.tar.bz2 |
Revert 52161 -Accidental checkin. Load Pepper v2 internal pdf plugin.
Also need to uncomment pepper_plugin_registry.cc
Review URL: http://codereview.chromium.org/2804037
TBR=jam@chromium.org
Review URL: http://codereview.chromium.org/2968007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/plugin_service.cc | 3 | ||||
-rw-r--r-- | chrome/browser/zygote_main_linux.cc | 3 | ||||
-rw-r--r-- | chrome/renderer/render_process_impl.cc | 16 |
3 files changed, 14 insertions, 8 deletions
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc index ba22fea..de8cc30 100644 --- a/chrome/browser/plugin_service.cc +++ b/chrome/browser/plugin_service.cc @@ -103,6 +103,9 @@ PluginService::PluginService() NPAPI::PluginList::Singleton()->AddExtraPluginPath(path); } + if (PathService::Get(chrome::FILE_PDF_PLUGIN, &path)) + NPAPI::PluginList::Singleton()->AddExtraPluginPath(path); + #ifndef DISABLE_NACL if (command_line->HasSwitch(switches::kInternalNaCl)) RegisterInternalNaClPlugin(); diff --git a/chrome/browser/zygote_main_linux.cc b/chrome/browser/zygote_main_linux.cc index 47f2cb7..1dbbbf5 100644 --- a/chrome/browser/zygote_main_linux.cc +++ b/chrome/browser/zygote_main_linux.cc @@ -532,7 +532,7 @@ static void PreSandboxInit() { FilePath module_path; if (PathService::Get(base::DIR_MODULE, &module_path)) media::InitializeMediaLibrary(module_path); -/* + // Load the PDF plugin before the sandbox is turned on. FilePath pdf; if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && @@ -542,7 +542,6 @@ static void PreSandboxInit() { bool rv = pdf_lib && pdf_lib->EnsureAlwaysLoaded(); DCHECK(rv) << "Couldn't load PDF plugin"; } -*/ } #if !defined(CHROMIUM_SELINUX) diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc index 60bb22d..b1b6bc6 100644 --- a/chrome/renderer/render_process_impl.cc +++ b/chrome/renderer/render_process_impl.cc @@ -179,23 +179,27 @@ RenderProcessImpl::RenderProcessImpl() media::InitializeOpenMaxLibrary(module_path); } #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. 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) - 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); + 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 } #endif |