OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Defines messages between the browser and NaCl process. | 5 // Defines messages between the browser and NaCl process. |
6 | 6 |
7 // Multiply-included message file, no traditional include guard. | 7 // Multiply-included message file, no traditional include guard. |
| 8 |
| 9 #include <stdint.h> |
| 10 |
8 #include "base/process/process.h" | 11 #include "base/process/process.h" |
| 12 #include "build/build_config.h" |
9 #include "components/nacl/common/nacl_types.h" | 13 #include "components/nacl/common/nacl_types.h" |
10 #include "components/nacl/common/nacl_types_param_traits.h" | 14 #include "components/nacl/common/nacl_types_param_traits.h" |
11 #include "ipc/ipc_channel_handle.h" | 15 #include "ipc/ipc_channel_handle.h" |
12 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
13 #include "ipc/ipc_platform_file.h" | 17 #include "ipc/ipc_platform_file.h" |
14 | 18 |
15 #define IPC_MESSAGE_START NaClMsgStart | 19 #define IPC_MESSAGE_START NaClMsgStart |
16 | 20 |
17 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClStartParams) | 21 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClStartParams) |
18 IPC_STRUCT_TRAITS_MEMBER(nexe_file) | 22 IPC_STRUCT_TRAITS_MEMBER(nexe_file) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 std::string /* channel ID for the loader */) | 69 std::string /* channel ID for the loader */) |
66 | 70 |
67 // Notify the browser process that the loader was launched successfully. | 71 // Notify the browser process that the loader was launched successfully. |
68 IPC_MESSAGE_CONTROL2(NaClProcessMsg_LoaderLaunched, | 72 IPC_MESSAGE_CONTROL2(NaClProcessMsg_LoaderLaunched, |
69 std::string, /* channel ID for the loader */ | 73 std::string, /* channel ID for the loader */ |
70 base::ProcessHandle /* loader process handle */) | 74 base::ProcessHandle /* loader process handle */) |
71 | 75 |
72 // Tells the NaCl broker to attach a debug exception handler to the | 76 // Tells the NaCl broker to attach a debug exception handler to the |
73 // given NaCl loader process. | 77 // given NaCl loader process. |
74 IPC_MESSAGE_CONTROL3(NaClProcessMsg_LaunchDebugExceptionHandler, | 78 IPC_MESSAGE_CONTROL3(NaClProcessMsg_LaunchDebugExceptionHandler, |
75 int32 /* pid of the NaCl process */, | 79 int32_t /* pid of the NaCl process */, |
76 base::ProcessHandle /* handle of the NaCl process */, | 80 base::ProcessHandle /* handle of the NaCl process */, |
77 std::string /* NaCl internal process layout info */) | 81 std::string /* NaCl internal process layout info */) |
78 | 82 |
79 // Notify the browser process that the broker process finished | 83 // Notify the browser process that the broker process finished |
80 // attaching a debug exception handler to the given NaCl loader | 84 // attaching a debug exception handler to the given NaCl loader |
81 // process. | 85 // process. |
82 IPC_MESSAGE_CONTROL2(NaClProcessMsg_DebugExceptionHandlerLaunched, | 86 IPC_MESSAGE_CONTROL2(NaClProcessMsg_DebugExceptionHandlerLaunched, |
83 int32 /* pid */, | 87 int32_t /* pid */, |
84 bool /* success */) | 88 bool /* success */) |
85 | 89 |
86 // Notify the broker that all loader processes have been terminated and it | 90 // Notify the broker that all loader processes have been terminated and it |
87 // should shutdown. | 91 // should shutdown. |
88 IPC_MESSAGE_CONTROL0(NaClProcessMsg_StopBroker) | 92 IPC_MESSAGE_CONTROL0(NaClProcessMsg_StopBroker) |
89 | 93 |
90 // Used by the NaCl process to request that a Windows debug exception | 94 // Used by the NaCl process to request that a Windows debug exception |
91 // handler be attached to it. | 95 // handler be attached to it. |
92 IPC_SYNC_MESSAGE_CONTROL1_1(NaClProcessMsg_AttachDebugExceptionHandler, | 96 IPC_SYNC_MESSAGE_CONTROL1_1(NaClProcessMsg_AttachDebugExceptionHandler, |
93 std::string, /* Internal process info */ | 97 std::string, /* Internal process info */ |
(...skipping 13 matching lines...) Expand all Loading... |
107 | 111 |
108 // Used by the NaCl process to add a validation signature to the validation | 112 // Used by the NaCl process to add a validation signature to the validation |
109 // database in the browser. | 113 // database in the browser. |
110 IPC_MESSAGE_CONTROL1(NaClProcessMsg_SetKnownToValidate, | 114 IPC_MESSAGE_CONTROL1(NaClProcessMsg_SetKnownToValidate, |
111 std::string /* A validation signature */) | 115 std::string /* A validation signature */) |
112 | 116 |
113 // Used by the NaCl process to acquire trusted information about a file directly | 117 // Used by the NaCl process to acquire trusted information about a file directly |
114 // from the browser, including the file's path as well as a fresh version of the | 118 // from the browser, including the file's path as well as a fresh version of the |
115 // file handle. | 119 // file handle. |
116 IPC_MESSAGE_CONTROL2(NaClProcessMsg_ResolveFileToken, | 120 IPC_MESSAGE_CONTROL2(NaClProcessMsg_ResolveFileToken, |
117 uint64, /* file_token_lo */ | 121 uint64_t, /* file_token_lo */ |
118 uint64 /* file_token_hi */) | 122 uint64_t /* file_token_hi */) |
119 IPC_MESSAGE_CONTROL4(NaClProcessMsg_ResolveFileTokenReply, | 123 IPC_MESSAGE_CONTROL4(NaClProcessMsg_ResolveFileTokenReply, |
120 uint64, /* file_token_lo */ | 124 uint64_t, /* file_token_lo */ |
121 uint64, /* file_token_hi */ | 125 uint64_t, /* file_token_hi */ |
122 IPC::PlatformFileForTransit, /* fd */ | 126 IPC::PlatformFileForTransit, /* fd */ |
123 base::FilePath /* Path opened to get fd */) | 127 base::FilePath /* Path opened to get fd */) |
124 | 128 |
125 // Notify the browser process that the server side of the PPAPI channel was | 129 // Notify the browser process that the server side of the PPAPI channel was |
126 // created successfully. | 130 // created successfully. |
127 // This is used for SFI mode only. Non-SFI mode passes channel handles in | 131 // This is used for SFI mode only. Non-SFI mode passes channel handles in |
128 // NaClStartParams instead. | 132 // NaClStartParams instead. |
129 IPC_MESSAGE_CONTROL4(NaClProcessHostMsg_PpapiChannelsCreated, | 133 IPC_MESSAGE_CONTROL4(NaClProcessHostMsg_PpapiChannelsCreated, |
130 IPC::ChannelHandle, /* browser_channel_handle */ | 134 IPC::ChannelHandle, /* browser_channel_handle */ |
131 IPC::ChannelHandle, /* ppapi_renderer_channel_handle */ | 135 IPC::ChannelHandle, /* ppapi_renderer_channel_handle */ |
132 IPC::ChannelHandle, /* trusted_renderer_channel_handle */ | 136 IPC::ChannelHandle, /* trusted_renderer_channel_handle */ |
133 IPC::ChannelHandle /* manifest_service_channel_handle */) | 137 IPC::ChannelHandle /* manifest_service_channel_handle */) |
OLD | NEW |