Chromium Code Reviews| 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 | 4 |
| 5 #ifndef COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ | 5 #ifndef COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ |
| 6 #define COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ | 6 #define COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 /* See NaClFileToken comment in nacl_process_host.h */ | 198 /* See NaClFileToken comment in nacl_process_host.h */ |
| 199 uint64_t token_lo; | 199 uint64_t token_lo; |
| 200 uint64_t token_hi; | 200 uint64_t token_hi; |
| 201 }; | 201 }; |
| 202 /** | 202 /** |
| 203 * @} | 203 * @} |
| 204 */ | 204 */ |
| 205 | 205 |
| 206 namespace nacl { | 206 namespace nacl { |
| 207 | 207 |
| 208 | |
|
bbudge
2016/12/08 23:20:00
remove stray line
Derek Schuff
2016/12/09 00:11:34
Done.
| |
| 208 // This is a set of interfaces used by the code in | 209 // This is a set of interfaces used by the code in |
| 209 // components/nacl/renderer/plugin/, implemented by | 210 // components/nacl/renderer/plugin/, implemented by |
| 210 // components/nacl/renderer/. | 211 // components/nacl/renderer/. |
| 211 // | 212 // |
| 212 // There is not really a good name for this set of interfaces because the | 213 // There is not really a good name for this set of interfaces because the |
| 213 // grouping exists only for historical reasons. It used to be a PPAPI | 214 // grouping exists only for historical reasons. It used to be a PPAPI |
| 214 // PPB_* interface (PPB_NaCl_Private) because the code in plugin/ used to | 215 // PPB_* interface (PPB_NaCl_Private) because the code in plugin/ used to |
| 215 // live outside the Chromium repo and used to be built as a separate | 216 // live outside the Chromium repo and used to be built as a separate |
| 216 // DSO/DLL. Since that's no longer the case, there is now no strong | 217 // DSO/DLL. Since that's no longer the case, there is now no strong |
| 217 // distinction between renderer/ and renderer/plugin/. | 218 // distinction between renderer/ and renderer/plugin/. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 uint64_t loaded_bytes, | 275 uint64_t loaded_bytes, |
| 275 uint64_t total_bytes); | 276 uint64_t total_bytes); |
| 276 /* Report an error that occured while attempting to load a nexe. */ | 277 /* Report an error that occured while attempting to load a nexe. */ |
| 277 static void ReportLoadError(PP_Instance instance, | 278 static void ReportLoadError(PP_Instance instance, |
| 278 PP_NaClError error, | 279 PP_NaClError error, |
| 279 const char* error_message); | 280 const char* error_message); |
| 280 /* Performs internal setup when an instance is created. */ | 281 /* Performs internal setup when an instance is created. */ |
| 281 static void InstanceCreated(PP_Instance instance); | 282 static void InstanceCreated(PP_Instance instance); |
| 282 /* Performs internal cleanup when an instance is destroyed. */ | 283 /* Performs internal cleanup when an instance is destroyed. */ |
| 283 static void InstanceDestroyed(PP_Instance instance); | 284 static void InstanceDestroyed(PP_Instance instance); |
| 285 /* Terminate the NaCl loader process associated with the instance */ | |
|
bbudge
2016/12/08 23:20:00
nit: Terminates
Derek Schuff
2016/12/09 00:11:34
Done.
| |
| 286 static void TerminateNaClLoader(PP_Instance instance); | |
| 284 /* Returns the kind of SFI sandbox implemented by NaCl on this | 287 /* Returns the kind of SFI sandbox implemented by NaCl on this |
| 285 * platform. | 288 * platform. |
| 286 */ | 289 */ |
| 287 static const char* GetSandboxArch(void); | 290 static const char* GetSandboxArch(void); |
| 288 /* Initializes internal state for a NaCl plugin. */ | 291 /* Initializes internal state for a NaCl plugin. */ |
| 289 static void InitializePlugin(PP_Instance instance, | 292 static void InitializePlugin(PP_Instance instance, |
| 290 uint32_t argc, | 293 uint32_t argc, |
| 291 const char* argn[], | 294 const char* argn[], |
| 292 const char* argv[]); | 295 const char* argv[]); |
| 293 /* Requests the NaCl manifest specified in the plugin arguments. */ | 296 /* Requests the NaCl manifest specified in the plugin arguments. */ |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 const char* pexe_url, | 350 const char* pexe_url, |
| 348 int32_t opt_level, | 351 int32_t opt_level, |
| 349 PP_Bool use_subzero, | 352 PP_Bool use_subzero, |
| 350 const struct PPP_PexeStreamHandler_1_0* stream_handler, | 353 const struct PPP_PexeStreamHandler_1_0* stream_handler, |
| 351 void* stream_handler_user_data); | 354 void* stream_handler_user_data); |
| 352 }; | 355 }; |
| 353 | 356 |
| 354 } // namespace nacl | 357 } // namespace nacl |
| 355 | 358 |
| 356 #endif /* COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ */ | 359 #endif /* COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ */ |
| OLD | NEW |