OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
jam
2013/06/11 00:53:59
nit: this seems like it should just be called "nac
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Multiply-included file, no traditional include guard. | |
6 | |
7 #include <string> | |
8 | |
9 #include "base/basictypes.h" | |
10 #include "base/process.h" | |
11 #include "build/build_config.h" | |
12 #include "chrome/common/common_param_traits.h" | |
13 #include "chrome/common/nacl_types.h" | |
14 #include "content/public/common/common_param_traits.h" | |
15 #include "googleurl/src/gurl.h" | |
16 #include "ipc/ipc_channel_handle.h" | |
17 #include "ipc/ipc_message_macros.h" | |
18 #include "ipc/ipc_platform_file.h" | |
19 | |
20 #define IPC_MESSAGE_START NaClHostMsgStart | |
21 | |
22 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchParams) | |
23 IPC_STRUCT_TRAITS_MEMBER(manifest_url) | |
24 IPC_STRUCT_TRAITS_MEMBER(render_view_id) | |
25 IPC_STRUCT_TRAITS_MEMBER(permission_bits) | |
26 IPC_STRUCT_TRAITS_MEMBER(uses_irt) | |
27 IPC_STRUCT_TRAITS_MEMBER(enable_dyncode_syscalls) | |
28 IPC_STRUCT_TRAITS_END() | |
29 | |
30 // A renderer sends this to the browser process when it wants to start | |
31 // a new instance of the Native Client process. The browser will launch | |
32 // the process and return an IPC channel handle. This handle will only | |
33 // be valid if the NaCl IPC proxy is enabled. | |
34 IPC_SYNC_MESSAGE_CONTROL1_4(NaClHostMsg_LaunchNaCl, | |
35 nacl::NaClLaunchParams /* launch_params */, | |
36 nacl::FileDescriptor /* imc channel handle */, | |
37 IPC::ChannelHandle /* ipc_channel_handle */, | |
38 base::ProcessId /* plugin_pid */, | |
39 int /* plugin_child_id */) | |
40 | |
41 // A renderer sends this to the browser process when it wants to | |
42 // open a file for from the Pnacl component directory. | |
43 IPC_SYNC_MESSAGE_CONTROL1_1(NaClHostMsg_GetReadonlyPnaclFD, | |
44 std::string /* name of requested PNaCl file */, | |
45 IPC::PlatformFileForTransit /* output file */) | |
46 | |
47 // A renderer sends this to the browser process when it wants to | |
48 // create a temporary file. | |
49 IPC_SYNC_MESSAGE_CONTROL0_1(NaClHostMsg_NaClCreateTemporaryFile, | |
50 IPC::PlatformFileForTransit /* out file */) | |
51 | |
52 // A renderer sends this to the browser process to display infobar | |
53 IPC_MESSAGE_CONTROL2(NaClHostMsg_NaClErrorStatus, | |
54 int /* render_view_id */, | |
55 int /* Error ID */) | |
56 | |
57 // A renderer sends this to the browser process when it wants to | |
58 // open a NaCl executable file from an installed application directory. | |
59 IPC_SYNC_MESSAGE_CONTROL2_3(NaClHostMsg_OpenNaClExecutable, | |
60 int /* render_view_id */, | |
61 GURL /* URL of NaCl executable file */, | |
62 IPC::PlatformFileForTransit /* output file */, | |
63 uint64 /* file_token_lo */, | |
64 uint64 /* file_token_hi */) | |
OLD | NEW |