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> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <utility> | 11 #include <utility> |
10 #include <vector> | 12 #include <vector> |
11 | 13 |
12 #include "base/basictypes.h" | |
13 #include "base/memory/shared_memory.h" | 14 #include "base/memory/shared_memory.h" |
14 #include "base/process/process_handle.h" | 15 #include "base/process/process_handle.h" |
15 #include "build/build_config.h" | 16 #include "build/build_config.h" |
16 #include "ipc/ipc_channel.h" | 17 #include "ipc/ipc_channel.h" |
17 #include "ipc/ipc_platform_file.h" | 18 #include "ipc/ipc_platform_file.h" |
18 | 19 |
19 namespace nacl { | 20 namespace nacl { |
20 | 21 |
21 // We allocate a page of shared memory for sharing crash information from | 22 // We allocate a page of shared memory for sharing crash information from |
22 // trusted code in the NaCl process to the renderer. | 23 // trusted code in the NaCl process to the renderer. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // serialization in nacl_messages.h and (for POD fields) the constructor | 112 // serialization in nacl_messages.h and (for POD fields) the constructor |
112 // in nacl_types.cc. | 113 // in nacl_types.cc. |
113 }; | 114 }; |
114 | 115 |
115 // Parameters sent to the browser process to have it launch a NaCl process. | 116 // Parameters sent to the browser process to have it launch a NaCl process. |
116 // | 117 // |
117 // If you change this, you will also need to update the IPC serialization in | 118 // If you change this, you will also need to update the IPC serialization in |
118 // nacl_host_messages.h. | 119 // nacl_host_messages.h. |
119 struct NaClLaunchParams { | 120 struct NaClLaunchParams { |
120 NaClLaunchParams(); | 121 NaClLaunchParams(); |
121 NaClLaunchParams( | 122 NaClLaunchParams(const std::string& manifest_url, |
122 const std::string& manifest_url, | 123 const IPC::PlatformFileForTransit& nexe_file, |
123 const IPC::PlatformFileForTransit& nexe_file, | 124 uint64_t nexe_token_lo, |
124 uint64_t nexe_token_lo, | 125 uint64_t nexe_token_hi, |
125 uint64_t nexe_token_hi, | 126 const std::vector<NaClResourcePrefetchRequest>& |
126 const std::vector< | 127 resource_prefetch_request_list, |
127 NaClResourcePrefetchRequest>& resource_prefetch_request_list, | 128 int render_view_id, |
128 int render_view_id, | 129 uint32_t permission_bits, |
129 uint32 permission_bits, | 130 bool uses_nonsfi_mode, |
130 bool uses_nonsfi_mode, | 131 NaClAppProcessType process_type); |
131 NaClAppProcessType process_type); | |
132 ~NaClLaunchParams(); | 132 ~NaClLaunchParams(); |
133 | 133 |
134 std::string manifest_url; | 134 std::string manifest_url; |
135 // On Windows, the HANDLE passed here is valid in the renderer's context. | 135 // On Windows, the HANDLE passed here is valid in the renderer's context. |
136 // It's the responsibility of the browser to duplicate this handle properly | 136 // It's the responsibility of the browser to duplicate this handle properly |
137 // for passing it to the plugin. | 137 // for passing it to the plugin. |
138 IPC::PlatformFileForTransit nexe_file; | 138 IPC::PlatformFileForTransit nexe_file; |
139 uint64_t nexe_token_lo; | 139 uint64_t nexe_token_lo; |
140 uint64_t nexe_token_hi; | 140 uint64_t nexe_token_hi; |
141 std::vector<NaClResourcePrefetchRequest> resource_prefetch_request_list; | 141 std::vector<NaClResourcePrefetchRequest> resource_prefetch_request_list; |
142 | 142 |
143 int render_view_id; | 143 int render_view_id; |
144 uint32 permission_bits; | 144 uint32_t permission_bits; |
145 bool uses_nonsfi_mode; | 145 bool uses_nonsfi_mode; |
146 | 146 |
147 NaClAppProcessType process_type; | 147 NaClAppProcessType process_type; |
148 }; | 148 }; |
149 | 149 |
150 struct NaClLaunchResult { | 150 struct NaClLaunchResult { |
151 NaClLaunchResult(); | 151 NaClLaunchResult(); |
152 NaClLaunchResult( | 152 NaClLaunchResult( |
153 const IPC::PlatformFileForTransit& imc_channel_handle, | 153 const IPC::PlatformFileForTransit& imc_channel_handle, |
154 const IPC::ChannelHandle& ppapi_ipc_channel_handle, | 154 const IPC::ChannelHandle& ppapi_ipc_channel_handle, |
(...skipping 20 matching lines...) Expand all Loading... |
175 base::ProcessId plugin_pid; | 175 base::ProcessId plugin_pid; |
176 int plugin_child_id; | 176 int plugin_child_id; |
177 | 177 |
178 // For NaCl <-> renderer crash information reporting. | 178 // For NaCl <-> renderer crash information reporting. |
179 base::SharedMemoryHandle crash_info_shmem_handle; | 179 base::SharedMemoryHandle crash_info_shmem_handle; |
180 }; | 180 }; |
181 | 181 |
182 } // namespace nacl | 182 } // namespace nacl |
183 | 183 |
184 #endif // COMPONENTS_NACL_COMMON_NACL_TYPES_H_ | 184 #endif // COMPONENTS_NACL_COMMON_NACL_TYPES_H_ |
OLD | NEW |