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 #ifndef COMPONENTS_NACL_COMMON_NACL_TYPES_H_ | 5 #ifndef COMPONENTS_NACL_COMMON_NACL_TYPES_H_ |
6 #define COMPONENTS_NACL_COMMON_NACL_TYPES_H_ | 6 #define COMPONENTS_NACL_COMMON_NACL_TYPES_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 NaClAppProcessType process_type; | 103 NaClAppProcessType process_type; |
104 | 104 |
105 // For NaCl <-> renderer crash information reporting. | 105 // For NaCl <-> renderer crash information reporting. |
106 base::SharedMemoryHandle crash_info_shmem_handle; | 106 base::SharedMemoryHandle crash_info_shmem_handle; |
107 | 107 |
108 // NOTE: Any new fields added here must also be added to the IPC | 108 // NOTE: Any new fields added here must also be added to the IPC |
109 // serialization in nacl_messages.h and (for POD fields) the constructor | 109 // serialization in nacl_messages.h and (for POD fields) the constructor |
110 // in nacl_types.cc. | 110 // in nacl_types.cc. |
111 }; | 111 }; |
112 | 112 |
113 // Parameters sent to the browser process to have it launch a NaCl process. | |
114 // | |
115 // If you change this, you will also need to update the IPC serialization in | |
116 // nacl_host_messages.h. | |
117 struct NaClLaunchParams { | |
118 NaClLaunchParams(); | |
119 NaClLaunchParams(const std::string& manifest_url, | |
120 const IPC::PlatformFileForTransit& nexe_file, | |
121 uint64_t nexe_token_lo, | |
122 uint64_t nexe_token_hi, | |
123 const std::vector<NaClResourcePrefetchRequest>& | |
124 resource_prefetch_request_list, | |
125 int render_view_id, | |
126 uint32_t permission_bits, | |
127 bool uses_nonsfi_mode, | |
128 NaClAppProcessType process_type); | |
129 NaClLaunchParams(const NaClLaunchParams& other); | |
130 ~NaClLaunchParams(); | |
131 | |
132 std::string manifest_url; | |
133 // On Windows, the HANDLE passed here is valid in the renderer's context. | |
134 // It's the responsibility of the browser to duplicate this handle properly | |
135 // for passing it to the plugin. | |
136 IPC::PlatformFileForTransit nexe_file; | |
137 uint64_t nexe_token_lo; | |
138 uint64_t nexe_token_hi; | |
139 std::vector<NaClResourcePrefetchRequest> resource_prefetch_request_list; | |
140 | |
141 int render_view_id; | |
142 uint32_t permission_bits; | |
143 bool uses_nonsfi_mode; | |
144 | |
145 NaClAppProcessType process_type; | |
146 }; | |
147 | |
148 struct NaClLaunchResult { | |
149 NaClLaunchResult(); | |
150 NaClLaunchResult( | |
151 const IPC::ChannelHandle& ppapi_ipc_channel_handle, | |
152 const IPC::ChannelHandle& trusted_ipc_channel_handle, | |
153 const IPC::ChannelHandle& manifest_service_ipc_channel_handle, | |
154 base::ProcessId plugin_pid, | |
155 int plugin_child_id, | |
156 base::SharedMemoryHandle crash_info_shmem_handle); | |
157 ~NaClLaunchResult(); | |
158 | |
159 // For plugin <-> renderer PPAPI communication. | |
160 IPC::ChannelHandle ppapi_ipc_channel_handle; | |
161 | |
162 // For plugin loader <-> renderer control communication (loading and | |
163 // starting nexe). | |
164 IPC::ChannelHandle trusted_ipc_channel_handle; | |
165 | |
166 // For plugin <-> renderer ManifestService communication. | |
167 IPC::ChannelHandle manifest_service_ipc_channel_handle; | |
168 | |
169 base::ProcessId plugin_pid; | |
170 int plugin_child_id; | |
171 | |
172 // For NaCl <-> renderer crash information reporting. | |
173 base::SharedMemoryHandle crash_info_shmem_handle; | |
174 }; | |
175 | |
176 } // namespace nacl | 113 } // namespace nacl |
177 | 114 |
178 #endif // COMPONENTS_NACL_COMMON_NACL_TYPES_H_ | 115 #endif // COMPONENTS_NACL_COMMON_NACL_TYPES_H_ |
OLD | NEW |