summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc8
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h6
-rw-r--r--chrome/common/render_messages_internal.h6
-rw-r--r--chrome/renderer/renderer_webkitclient_impl.cc2
4 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index 0ef86ea..b5d399d 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -436,7 +436,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_DeleteCookie, OnDeleteCookie)
IPC_MESSAGE_HANDLER(ViewHostMsg_GetCookiesEnabled, OnGetCookiesEnabled)
#if defined(OS_WIN) // This hack is Windows-specific.
- IPC_MESSAGE_HANDLER(ViewHostMsg_LoadFont, OnLoadFont)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_PreCacheFont, OnPreCacheFont)
#endif
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetPlugins, OnGetPlugins)
IPC_MESSAGE_HANDLER(ViewHostMsg_GetPluginPath, OnGetPluginPath)
@@ -713,10 +713,10 @@ void ResourceMessageFilter::OnGetCookiesEnabled(
}
#if defined(OS_WIN) // This hack is Windows-specific.
-void ResourceMessageFilter::OnLoadFont(LOGFONT font) {
- // If renderer is running in a sandbox, GetTextMetrics
+void ResourceMessageFilter::OnPreCacheFont(LOGFONT font) {
+ // If the renderer is running in a sandbox, GetTextMetrics()
// can sometimes fail. If a font has not been loaded
- // previously, GetTextMetrics will try to load the font
+ // previously, GetTextMetrics() will try to load the font
// from the font file. However, the sandboxed renderer does
// not have permissions to access any font files and
// the call fails. So we make the browser pre-load the
diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h
index e16edc8..4a3f544 100644
--- a/chrome/browser/renderer_host/resource_message_filter.h
+++ b/chrome/browser/renderer_host/resource_message_filter.h
@@ -161,9 +161,9 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter,
uint32 user_data);
#if defined(OS_WIN) // This hack is Windows-specific.
- // Cache fonts for the renderer. See ResourceMessageFilter::OnLoadFont
- // implementation for more details
- void OnLoadFont(LOGFONT font);
+ // Cache fonts for the renderer. See ResourceMessageFilter::OnPreCacheFont
+ // implementation for more details.
+ void OnPreCacheFont(LOGFONT font);
#endif
#if !defined(OS_MACOSX)
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 60c4cab..d575873 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -1407,9 +1407,9 @@ IPC_BEGIN_MESSAGES(ViewHost)
#endif
#if defined(OS_WIN)
- // Request that the given font be loaded by the browser.
- // Please see ResourceMessageFilter::OnLoadFont for details.
- IPC_SYNC_MESSAGE_CONTROL1_0(ViewHostMsg_LoadFont,
+ // Request that the given font be loaded by the browser so it's cached by the
+ // OS. Please see ResourceMessageFilter::OnPreCacheFont for details.
+ IPC_SYNC_MESSAGE_CONTROL1_0(ViewHostMsg_PreCacheFont,
LOGFONT /* font data */)
#endif // defined(OS_WIN)
diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc
index ec34479..5359f13 100644
--- a/chrome/renderer/renderer_webkitclient_impl.cc
+++ b/chrome/renderer/renderer_webkitclient_impl.cc
@@ -230,7 +230,7 @@ WebString RendererWebKitClientImpl::MimeRegistry::preferredExtensionForMIMEType(
bool RendererWebKitClientImpl::SandboxSupport::ensureFontLoaded(HFONT font) {
LOGFONT logfont;
GetObject(font, sizeof(LOGFONT), &logfont);
- return RenderThread::current()->Send(new ViewHostMsg_LoadFont(logfont));
+ return RenderThread::current()->Send(new ViewHostMsg_PreCacheFont(logfont));
}
#elif defined(OS_LINUX)