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

Unified Diff: content/common/render_process_messages.h

Issue 1346473003: Move font IPCs to be RenderProcess messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/common/mac/attributed_string_coder.mm ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/render_process_messages.h
diff --git a/content/common/render_process_messages.h b/content/common/render_process_messages.h
index 067d7afa54140871c0adfa13a91cb6a570ab2b0e..b235103bba7c85118f48827cb2afc9f80d81ea2e 100644
--- a/content/common/render_process_messages.h
+++ b/content/common/render_process_messages.h
@@ -7,15 +7,27 @@
#include <string>
+#include "base/memory/shared_memory.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
#include "url/gurl.h"
+#if defined(OS_MACOSX)
+#include "content/common/mac/font_descriptor.h"
+#endif
+
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
#define IPC_MESSAGE_START RenderProcessMsgStart
+#if defined(OS_MACOSX)
+IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
+ IPC_STRUCT_TRAITS_MEMBER(font_name)
+ IPC_STRUCT_TRAITS_MEMBER(font_point_size)
+IPC_STRUCT_TRAITS_END()
+#endif
+
////////////////////////////////////////////////////////////////////////////////
// Messages sent from the browser to the render process.
@@ -30,3 +42,19 @@ IPC_SYNC_MESSAGE_CONTROL3_1(RenderProcessHostMsg_Keygen,
std::string /* challenge string */,
GURL /* URL of requestor */,
std::string /* signed public key and challenge */)
+
+#if defined(OS_MACOSX)
+// Request that the browser load a font into shared memory for us.
+IPC_SYNC_MESSAGE_CONTROL1_3(RenderProcessHostMsg_LoadFont,
+ FontDescriptor /* font to load */,
+ uint32 /* buffer size */,
+ base::SharedMemoryHandle /* font data */,
+ uint32 /* font id */)
+#elif defined(OS_WIN)
+// Request that the given font characters be loaded by the browser so it's
+// cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
+// for details.
+IPC_SYNC_MESSAGE_CONTROL2_0(RenderProcessHostMsg_PreCacheFontCharacters,
+ LOGFONT /* font_data */,
+ base::string16 /* characters */)
+#endif
« no previous file with comments | « content/common/mac/attributed_string_coder.mm ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698