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

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 2114583002: Windows: Make it possible to print text with GDI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again, resolve conflicts Created 4 years, 4 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 | « content/browser/renderer_host/render_message_filter.h ('k') | content/common/render_process_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 17d289d72494bae3607e5b24cf1127134419c35b..c40827902d890cc4d2cacea75b5b772b108ac5ad 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -212,9 +212,6 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message) {
OnCacheableMetadataAvailableForCacheStorage)
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER_DELAY_REPLY(RenderProcessHostMsg_LoadFont, OnLoadFont)
-#elif defined(OS_WIN)
- IPC_MESSAGE_HANDLER(RenderProcessHostMsg_PreCacheFontCharacters,
- OnPreCacheFontCharacters)
#endif
IPC_MESSAGE_HANDLER(ViewHostMsg_MediaLogEvents, OnMediaLogEvents)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -321,42 +318,7 @@ void RenderMessageFilter::SendLoadFontReply(IPC::Message* reply,
Send(reply);
}
-#elif defined(OS_WIN)
-
-void RenderMessageFilter::OnPreCacheFontCharacters(
- const LOGFONT& font,
- const base::string16& str) {
- // TODO(scottmg): pdf/ppapi still require the renderer to be able to precache
- // GDI fonts (http://crbug.com/383227), even when using DirectWrite.
- // Eventually this shouldn't be added and should be moved to
- // FontCacheDispatcher too. http://crbug.com/356346.
-
- // First, comments from FontCacheDispatcher::OnPreCacheFont do apply here too.
- // Except that for True Type fonts,
- // GetTextMetrics will not load the font in memory.
- // The only way windows seem to load properly, it is to create a similar
- // device (like the one in which we print), then do an ExtTextOut,
- // as we do in the printing thread, which is sandboxed.
- HDC hdc = CreateEnhMetaFile(NULL, NULL, NULL, NULL);
- HFONT font_handle = CreateFontIndirect(&font);
- DCHECK(NULL != font_handle);
-
- HGDIOBJ old_font = SelectObject(hdc, font_handle);
- DCHECK(NULL != old_font);
-
- ExtTextOut(hdc, 0, 0, ETO_GLYPH_INDEX, 0, str.c_str(), str.length(), NULL);
-
- SelectObject(hdc, old_font);
- DeleteObject(font_handle);
-
- HENHMETAFILE metafile = CloseEnhMetaFile(hdc);
-
- if (metafile)
- DeleteEnhMetaFile(metafile);
-}
-
-
-#endif // OS_*
+#endif // defined(OS_MACOSX)
void RenderMessageFilter::AllocateSharedMemoryOnFileThread(
uint32_t buffer_size,
« no previous file with comments | « content/browser/renderer_host/render_message_filter.h ('k') | content/common/render_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698