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 // Multiply-included file, no traditional include guard. | 5 // Multiply-included file, no traditional include guard. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/process/process.h" | 10 #include "base/process/process.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "components/nacl/common/nacl_types.h" | 12 #include "components/nacl/common/nacl_types.h" |
13 #include "components/nacl/common/nacl_types_param_traits.h" | 13 #include "components/nacl/common/nacl_types_param_traits.h" |
14 #include "components/nacl/common/pnacl_types.h" | 14 #include "components/nacl/common/pnacl_types.h" |
15 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
16 #include "ipc/ipc_channel_handle.h" | 16 #include "ipc/ipc_channel_handle.h" |
17 #include "ipc/ipc_message_macros.h" | 17 #include "ipc/ipc_message_macros.h" |
18 #include "ipc/ipc_platform_file.h" | 18 #include "ipc/ipc_platform_file.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 | 20 |
21 #define IPC_MESSAGE_START NaClHostMsgStart | 21 #define IPC_MESSAGE_START NaClHostMsgStart |
22 | 22 |
23 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchParams) | 23 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchParams) |
24 IPC_STRUCT_TRAITS_MEMBER(manifest_url) | 24 IPC_STRUCT_TRAITS_MEMBER(manifest_url) |
25 IPC_STRUCT_TRAITS_MEMBER(nexe_file) | 25 IPC_STRUCT_TRAITS_MEMBER(nexe_file) |
26 IPC_STRUCT_TRAITS_MEMBER(nexe_token_lo) | 26 IPC_STRUCT_TRAITS_MEMBER(nexe_token_lo) |
27 IPC_STRUCT_TRAITS_MEMBER(nexe_token_hi) | 27 IPC_STRUCT_TRAITS_MEMBER(nexe_token_hi) |
| 28 IPC_STRUCT_TRAITS_MEMBER(resource_files_info) |
28 IPC_STRUCT_TRAITS_MEMBER(render_view_id) | 29 IPC_STRUCT_TRAITS_MEMBER(render_view_id) |
29 IPC_STRUCT_TRAITS_MEMBER(permission_bits) | 30 IPC_STRUCT_TRAITS_MEMBER(permission_bits) |
30 IPC_STRUCT_TRAITS_MEMBER(uses_nonsfi_mode) | 31 IPC_STRUCT_TRAITS_MEMBER(uses_nonsfi_mode) |
31 IPC_STRUCT_TRAITS_MEMBER(process_type) | 32 IPC_STRUCT_TRAITS_MEMBER(process_type) |
32 IPC_STRUCT_TRAITS_END() | 33 IPC_STRUCT_TRAITS_END() |
33 | 34 |
| 35 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchParams::ResourceFileInfo) |
| 36 IPC_STRUCT_TRAITS_MEMBER(file) |
| 37 IPC_STRUCT_TRAITS_MEMBER(file_token_lo) |
| 38 IPC_STRUCT_TRAITS_MEMBER(file_token_hi) |
| 39 IPC_STRUCT_TRAITS_MEMBER(file_key) |
| 40 IPC_STRUCT_TRAITS_END() |
| 41 |
34 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchResult) | 42 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchResult) |
35 IPC_STRUCT_TRAITS_MEMBER(imc_channel_handle) | 43 IPC_STRUCT_TRAITS_MEMBER(imc_channel_handle) |
36 IPC_STRUCT_TRAITS_MEMBER(ppapi_ipc_channel_handle) | 44 IPC_STRUCT_TRAITS_MEMBER(ppapi_ipc_channel_handle) |
37 IPC_STRUCT_TRAITS_MEMBER(trusted_ipc_channel_handle) | 45 IPC_STRUCT_TRAITS_MEMBER(trusted_ipc_channel_handle) |
38 IPC_STRUCT_TRAITS_MEMBER(manifest_service_ipc_channel_handle) | 46 IPC_STRUCT_TRAITS_MEMBER(manifest_service_ipc_channel_handle) |
39 IPC_STRUCT_TRAITS_MEMBER(plugin_pid) | 47 IPC_STRUCT_TRAITS_MEMBER(plugin_pid) |
40 IPC_STRUCT_TRAITS_MEMBER(plugin_child_id) | 48 IPC_STRUCT_TRAITS_MEMBER(plugin_child_id) |
41 IPC_STRUCT_TRAITS_MEMBER(crash_info_shmem_handle) | 49 IPC_STRUCT_TRAITS_MEMBER(crash_info_shmem_handle) |
42 IPC_STRUCT_TRAITS_END() | 50 IPC_STRUCT_TRAITS_END() |
43 | 51 |
44 IPC_STRUCT_TRAITS_BEGIN(nacl::PnaclCacheInfo) | 52 IPC_STRUCT_TRAITS_BEGIN(nacl::PnaclCacheInfo) |
45 IPC_STRUCT_TRAITS_MEMBER(pexe_url) | 53 IPC_STRUCT_TRAITS_MEMBER(pexe_url) |
46 IPC_STRUCT_TRAITS_MEMBER(abi_version) | 54 IPC_STRUCT_TRAITS_MEMBER(abi_version) |
47 IPC_STRUCT_TRAITS_MEMBER(opt_level) | 55 IPC_STRUCT_TRAITS_MEMBER(opt_level) |
48 IPC_STRUCT_TRAITS_MEMBER(last_modified) | 56 IPC_STRUCT_TRAITS_MEMBER(last_modified) |
49 IPC_STRUCT_TRAITS_MEMBER(etag) | 57 IPC_STRUCT_TRAITS_MEMBER(etag) |
50 IPC_STRUCT_TRAITS_MEMBER(has_no_store_header) | 58 IPC_STRUCT_TRAITS_MEMBER(has_no_store_header) |
51 IPC_STRUCT_TRAITS_MEMBER(sandbox_isa) | 59 IPC_STRUCT_TRAITS_MEMBER(sandbox_isa) |
52 IPC_STRUCT_TRAITS_MEMBER(extra_flags) | 60 IPC_STRUCT_TRAITS_MEMBER(extra_flags) |
53 IPC_STRUCT_TRAITS_END() | 61 IPC_STRUCT_TRAITS_END() |
54 | 62 |
| 63 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClOpenExecutableResult) |
| 64 IPC_STRUCT_TRAITS_MEMBER(file_info) |
| 65 IPC_STRUCT_TRAITS_MEMBER(resource_files_info) |
| 66 IPC_STRUCT_TRAITS_END() |
| 67 |
| 68 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClOpenExecutableResult::FileInfo) |
| 69 IPC_STRUCT_TRAITS_MEMBER(file) |
| 70 IPC_STRUCT_TRAITS_MEMBER(file_token_lo) |
| 71 IPC_STRUCT_TRAITS_MEMBER(file_token_hi) |
| 72 IPC_STRUCT_TRAITS_END() |
| 73 |
55 // A renderer sends this to the browser process when it wants to start | 74 // A renderer sends this to the browser process when it wants to start |
56 // a new instance of the Native Client process. The browser will launch | 75 // a new instance of the Native Client process. The browser will launch |
57 // the process and return an IPC channel handle. This handle will only | 76 // the process and return an IPC channel handle. This handle will only |
58 // be valid if the NaCl IPC proxy is enabled. | 77 // be valid if the NaCl IPC proxy is enabled. |
59 IPC_SYNC_MESSAGE_CONTROL1_2(NaClHostMsg_LaunchNaCl, | 78 IPC_SYNC_MESSAGE_CONTROL1_2(NaClHostMsg_LaunchNaCl, |
60 nacl::NaClLaunchParams /* launch_params */, | 79 nacl::NaClLaunchParams /* launch_params */, |
61 nacl::NaClLaunchResult /* launch_result */, | 80 nacl::NaClLaunchResult /* launch_result */, |
62 std::string /* error_message */) | 81 std::string /* error_message */) |
63 | 82 |
64 // A renderer sends this to the browser process when it wants to | 83 // A renderer sends this to the browser process when it wants to |
(...skipping 30 matching lines...) Expand all Loading... |
95 IPC_MESSAGE_CONTROL2(NaClHostMsg_ReportTranslationFinished, | 114 IPC_MESSAGE_CONTROL2(NaClHostMsg_ReportTranslationFinished, |
96 int /* instance */, | 115 int /* instance */, |
97 bool /* success */) | 116 bool /* success */) |
98 | 117 |
99 // A renderer sends this to the browser process to report when the client | 118 // A renderer sends this to the browser process to report when the client |
100 // architecture is not listed in the manifest. | 119 // architecture is not listed in the manifest. |
101 IPC_MESSAGE_CONTROL1(NaClHostMsg_MissingArchError, | 120 IPC_MESSAGE_CONTROL1(NaClHostMsg_MissingArchError, |
102 int /* render_view_id */) | 121 int /* render_view_id */) |
103 | 122 |
104 // A renderer sends this to the browser process when it wants to | 123 // A renderer sends this to the browser process when it wants to |
105 // open a NaCl executable file from an installed application directory. | 124 // open NaCl resource files from an installed application directory. |
106 IPC_SYNC_MESSAGE_CONTROL2_3(NaClHostMsg_OpenNaClExecutable, | 125 IPC_SYNC_MESSAGE_CONTROL3_1(NaClHostMsg_OpenNaClResources, |
107 int /* render_view_id */, | 126 int /* render_view_id */, |
108 GURL /* URL of NaCl executable file */, | 127 GURL /* URL of NaCl executable file */, |
109 IPC::PlatformFileForTransit /* output file */, | 128 std::vector<GURL> /* URLs of NaCl resource files */, |
110 uint64 /* file_token_lo */, | 129 nacl::NaClOpenExecutableResult /* open_result */) |
111 uint64 /* file_token_hi */) | |
112 | 130 |
113 // A renderer sends this to the browser process to determine how many | 131 // A renderer sends this to the browser process to determine how many |
114 // processors are online. | 132 // processors are online. |
115 IPC_SYNC_MESSAGE_CONTROL0_1(NaClHostMsg_NaClGetNumProcessors, | 133 IPC_SYNC_MESSAGE_CONTROL0_1(NaClHostMsg_NaClGetNumProcessors, |
116 int /* Number of processors */) | 134 int /* Number of processors */) |
117 | 135 |
118 // A renderer sends this to the browser process to determine if the | 136 // A renderer sends this to the browser process to determine if the |
119 // NaCl application started from the given NMF URL will be debugged. | 137 // NaCl application started from the given NMF URL will be debugged. |
120 // If not (filtered out by commandline flags), it sets should_debug to false. | 138 // If not (filtered out by commandline flags), it sets should_debug to false. |
121 IPC_SYNC_MESSAGE_CONTROL1_1(NaClHostMsg_NaClDebugEnabledForURL, | 139 IPC_SYNC_MESSAGE_CONTROL1_1(NaClHostMsg_NaClDebugEnabledForURL, |
122 GURL /* alleged URL of NMF file */, | 140 GURL /* alleged URL of NMF file */, |
123 bool /* should debug */) | 141 bool /* should debug */) |
OLD | NEW |