OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 */ | |
5 | 4 |
6 /* From private/ppb_nacl_private.idl modified Sun Feb 8 11:33:30 2015. */ | 5 #ifndef COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ |
7 | 6 #define COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ |
8 #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ | |
9 #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ | |
10 | 7 |
11 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_completion_callback.h" | 9 #include "ppapi/c/pp_completion_callback.h" |
13 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
14 #include "ppapi/c/pp_macros.h" | 11 #include "ppapi/c/pp_macros.h" |
15 #include "ppapi/c/pp_stdint.h" | 12 #include "ppapi/c/pp_stdint.h" |
16 #include "ppapi/c/pp_var.h" | 13 #include "ppapi/c/pp_var.h" |
| 14 #include "ppapi/c/private/pp_file_handle.h" |
| 15 #include "ppapi/c/private/ppb_instance_private.h" |
17 #include "ppapi/c/private/ppp_pexe_stream_handler.h" | 16 #include "ppapi/c/private/ppp_pexe_stream_handler.h" |
18 | 17 |
19 #define PPB_NACL_PRIVATE_INTERFACE_1_0 "PPB_NaCl_Private;1.0" | 18 // This file defines an interface that is used by the code in |
20 #define PPB_NACL_PRIVATE_INTERFACE PPB_NACL_PRIVATE_INTERFACE_1_0 | 19 // components/nacl/renderer/plugin/. It is defined as a PPAPI PPB_* |
| 20 // interface for historical reasons: The code in plugin/ used to live |
| 21 // outside the Chromium repo. |
| 22 // |
| 23 // In the future, we may integrate the code in nacl/renderer/plugin/ more |
| 24 // closely with nacl/renderer/. This could include having plugin/ call the |
| 25 // functions below directly, rather than providing these functions via the |
| 26 // PPB_NaCl_Private interface struct. |
21 | 27 |
22 /** | 28 #define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl_Private" |
23 * @file | |
24 * This file contains NaCl private interfaces. This interface is not versioned | |
25 * and is for internal Chrome use. It may change without notice. */ | |
26 | |
27 | |
28 #include "ppapi/c/private/pp_file_handle.h" | |
29 #include "ppapi/c/private/ppb_instance_private.h" | |
30 | 29 |
31 /** | 30 /** |
32 * @addtogroup Enums | 31 * @addtogroup Enums |
33 * @{ | 32 * @{ |
34 */ | 33 */ |
35 /** NaCl-specific errors that should be reported to the user. | 34 /** NaCl-specific errors that should be reported to the user. |
36 * These error codes are reported via UMA so, if you edit them: | 35 * These error codes are reported via UMA so, if you edit them: |
37 * 1) make sure you understand UMA first. | 36 * 1) make sure you understand UMA first. |
38 * 2) update src/tools/metrics/histograms/histograms.xml | 37 * 2) update src/tools/metrics/histograms/histograms.xml |
39 * Values are explicitly specified to make sure they don't shift around when | 38 * Values are explicitly specified to make sure they don't shift around when |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 uint64_t token_hi; | 197 uint64_t token_hi; |
199 }; | 198 }; |
200 /** | 199 /** |
201 * @} | 200 * @} |
202 */ | 201 */ |
203 | 202 |
204 /** | 203 /** |
205 * @addtogroup Interfaces | 204 * @addtogroup Interfaces |
206 * @{ | 205 * @{ |
207 */ | 206 */ |
208 /* PPB_NaCl_Private */ | 207 struct PPB_NaCl_Private { |
209 struct PPB_NaCl_Private_1_0 { | |
210 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success | 208 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success |
211 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on | 209 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on |
212 * failure. | 210 * failure. |
213 * The |nexe_file_info| is currently used only in non-SFI mode. It is the | 211 * The |nexe_file_info| is currently used only in non-SFI mode. It is the |
214 * file handle for the main nexe file, which should be initially loaded. | 212 * file handle for the main nexe file, which should be initially loaded. |
215 * LaunchSelLdr takes the ownership of the file handle. | 213 * LaunchSelLdr takes the ownership of the file handle. |
216 * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should | 214 * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should |
217 * be used with the binary pointed by the url. | 215 * be used with the binary pointed by the url. |
218 */ | 216 */ |
219 void (*LaunchSelLdr)(PP_Instance instance, | 217 void (*LaunchSelLdr)(PP_Instance instance, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 * Otherwise, |stream_callback| is called repeatedly with blocks of data | 344 * Otherwise, |stream_callback| is called repeatedly with blocks of data |
347 * as they are received. |stream_finished_callback| is called after all | 345 * as they are received. |stream_finished_callback| is called after all |
348 * data has been received and dispatched to |stream_callback|. | 346 * data has been received and dispatched to |stream_callback|. |
349 */ | 347 */ |
350 void (*StreamPexe)(PP_Instance instance, | 348 void (*StreamPexe)(PP_Instance instance, |
351 const char* pexe_url, | 349 const char* pexe_url, |
352 int32_t opt_level, | 350 int32_t opt_level, |
353 const struct PPP_PexeStreamHandler_1_0* stream_handler, | 351 const struct PPP_PexeStreamHandler_1_0* stream_handler, |
354 void* stream_handler_user_data); | 352 void* stream_handler_user_data); |
355 }; | 353 }; |
356 | |
357 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; | |
358 /** | 354 /** |
359 * @} | 355 * @} |
360 */ | 356 */ |
361 | 357 |
362 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ | 358 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ |
363 | 359 |
OLD | NEW |