1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Common IPC messages used for render processes.
6 // Multiply-included message file, hence no include guard.
10 #include "base/memory/shared_memory.h"
11 #include "ipc/ipc_message_macros.h"
12 #include "ipc/ipc_message_utils.h"
15 #if defined(OS_MACOSX)
16 #include "content/common/mac/font_descriptor.h"
19 #undef IPC_MESSAGE_EXPORT
20 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
22 #define IPC_MESSAGE_START RenderProcessMsgStart
24 #if defined(OS_MACOSX)
25 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor
)
26 IPC_STRUCT_TRAITS_MEMBER(font_name
)
27 IPC_STRUCT_TRAITS_MEMBER(font_point_size
)
28 IPC_STRUCT_TRAITS_END()
31 ////////////////////////////////////////////////////////////////////////////////
32 // Messages sent from the browser to the render process.
34 ////////////////////////////////////////////////////////////////////////////////
35 // Messages sent from the render process to the browser.
37 // Asks the browser process to generate a keypair for grabbing a client
38 // certificate from a CA (<keygen> tag), and returns the signed public
39 // key and challenge string.
40 IPC_SYNC_MESSAGE_CONTROL3_1(RenderProcessHostMsg_Keygen
,
41 uint32
/* key size index */,
42 std::string
/* challenge string */,
43 GURL
/* URL of requestor */,
44 std::string
/* signed public key and challenge */)
46 // Message sent from the renderer to the browser to request that the browser
47 // cache |data| associated with |url| and |expected_response_time|.
48 IPC_MESSAGE_CONTROL3(RenderProcessHostMsg_DidGenerateCacheableMetadata
,
50 base::Time
/* expected_response_time */,
51 std::vector
<char> /* data */)
53 // Notify the browser that this render process can or can't be suddenly
55 IPC_MESSAGE_CONTROL1(RenderProcessHostMsg_SuddenTerminationChanged
,
58 // Asks the browser for the renderer process memory size stats.
59 IPC_SYNC_MESSAGE_CONTROL0_2(RenderProcessHostMsg_GetProcessMemorySizes
,
60 size_t /* private_bytes */,
61 size_t /* shared_bytes */)
63 #if defined(OS_MACOSX)
64 // Request that the browser load a font into shared memory for us.
65 IPC_SYNC_MESSAGE_CONTROL1_3(RenderProcessHostMsg_LoadFont
,
66 FontDescriptor
/* font to load */,
67 uint32
/* buffer size */,
68 base::SharedMemoryHandle
/* font data */,
71 // Request that the given font characters be loaded by the browser so it's
72 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
74 IPC_SYNC_MESSAGE_CONTROL2_0(RenderProcessHostMsg_PreCacheFontCharacters
,
75 LOGFONT
/* font_data */,
76 base::string16
/* characters */)
78 // Asks the browser for the user's monitor profile.
79 IPC_SYNC_MESSAGE_CONTROL0_1(RenderProcessHostMsg_GetMonitorColorProfile
,
80 std::vector
<char> /* profile */)