summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 14:06:14 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 14:06:14 +0000
commitbc0c3ba245f12d916dbf028cee9a602bda2550f9 (patch)
tree348362d01cb7eb1bab1e4ff83ccaab3cb4fc1381 /chrome/browser/renderer_host
parentc7189e191b90798715edcdf8b2edaa2c0c29f3cd (diff)
downloadchromium_src-bc0c3ba245f12d916dbf028cee9a602bda2550f9.zip
chromium_src-bc0c3ba245f12d916dbf028cee9a602bda2550f9.tar.gz
chromium_src-bc0c3ba245f12d916dbf028cee9a602bda2550f9.tar.bz2
Cleanup: Rename OnLoadFont->OnPreCacheFont
I'm working on a Mac specific change where we'll need an IPC message to load a font and pass the font data back to the renderer process. To prevent confusion this CL preemptively renames a Windows message which actually causes a font to be cached by the browser. The distinction between these two operations is subtle but I thought it best to try to prevent future confusion by making sure the IPC messages don't have similar names. BUG=None TEST=None Review URL: http://codereview.chromium.org/1805002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc8
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h6
2 files changed, 7 insertions, 7 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)