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

Unified Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 854773002: Fix font loading in OOP PDF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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 | « no previous file | content/ppapi_plugin/ppapi_thread.cc » ('j') | content/ppapi_plugin/ppapi_thread.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_process_observer.cc
diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc
index 2e8d4ee943222e3cdde1413f7337a536e2eb30a5..cb16d14ea9525326b456e91f8803d278f3b09649 100644
--- a/chrome/renderer/chrome_render_process_observer.cc
+++ b/chrome/renderer/chrome_render_process_observer.cc
@@ -281,14 +281,16 @@ ChromeRenderProcessObserver::ChromeRenderProcessObserver(
net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
#if defined(OS_WIN)
- // Need to patch a few functions for font loading to work correctly.
- base::FilePath pdf;
- if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) &&
- base::PathExists(pdf)) {
- 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 (!command_line.HasSwitch(switches::kEnableOutOfProcessPdf)) {
+ // Need to patch a few functions for font loading to work correctly.
+ base::FilePath pdf;
+ if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) &&
+ base::PathExists(pdf)) {
+ 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
« no previous file with comments | « no previous file | content/ppapi_plugin/ppapi_thread.cc » ('j') | content/ppapi_plugin/ppapi_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698