| 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 "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_completion_callback.h" | 9 #include "ppapi/c/pp_completion_callback.h" |
| 10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 * @} | 162 * @} |
| 163 */ | 163 */ |
| 164 | 164 |
| 165 /** | 165 /** |
| 166 * @addtogroup Structs | 166 * @addtogroup Structs |
| 167 * @{ | 167 * @{ |
| 168 */ | 168 */ |
| 169 struct PP_PNaClOptions { | 169 struct PP_PNaClOptions { |
| 170 PP_Bool translate; | 170 PP_Bool translate; |
| 171 PP_Bool is_debug; | 171 PP_Bool is_debug; |
| 172 PP_Bool use_subzero; |
| 172 int32_t opt_level; | 173 int32_t opt_level; |
| 173 }; | 174 }; |
| 174 /** | 175 /** |
| 175 * @} | 176 * @} |
| 176 */ | 177 */ |
| 177 | 178 |
| 178 /** | 179 /** |
| 179 * @addtogroup Typedefs | 180 * @addtogroup Typedefs |
| 180 * @{ | 181 * @{ |
| 181 */ | 182 */ |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 * browser may then store the translation in the cache. The renderer | 255 * browser may then store the translation in the cache. The renderer |
| 255 * must first have called GetNexeFd for the same instance. (The browser is | 256 * must first have called GetNexeFd for the same instance. (The browser is |
| 256 * not guaranteed to store the nexe even if |success| is true; if there is | 257 * not guaranteed to store the nexe even if |success| is true; if there is |
| 257 * an error on the browser side, or the file is too big for the cache, or | 258 * an error on the browser side, or the file is too big for the cache, or |
| 258 * the browser is in incognito mode, no notification will be delivered to | 259 * the browser is in incognito mode, no notification will be delivered to |
| 259 * the plugin.) | 260 * the plugin.) |
| 260 */ | 261 */ |
| 261 void (*ReportTranslationFinished)(PP_Instance instance, | 262 void (*ReportTranslationFinished)(PP_Instance instance, |
| 262 PP_Bool success, | 263 PP_Bool success, |
| 263 int32_t opt_level, | 264 int32_t opt_level, |
| 265 PP_Bool use_subzero, |
| 264 int64_t pexe_size, | 266 int64_t pexe_size, |
| 265 int64_t compile_time_us); | 267 int64_t compile_time_us); |
| 266 /* Dispatch a progress event on the DOM element where the given instance is | 268 /* Dispatch a progress event on the DOM element where the given instance is |
| 267 * embedded. | 269 * embedded. |
| 268 */ | 270 */ |
| 269 void (*DispatchEvent)(PP_Instance instance, | 271 void (*DispatchEvent)(PP_Instance instance, |
| 270 PP_NaClEventType event_type, | 272 PP_NaClEventType event_type, |
| 271 const char* resource_url, | 273 const char* resource_url, |
| 272 PP_Bool length_is_computable, | 274 PP_Bool length_is_computable, |
| 273 uint64_t loaded_bytes, | 275 uint64_t loaded_bytes, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 300 * plugin. | 302 * plugin. |
| 301 */ | 303 */ |
| 302 void (*ProcessNaClManifest)(PP_Instance instance, const char* program_url); | 304 void (*ProcessNaClManifest)(PP_Instance instance, const char* program_url); |
| 303 PP_Bool (*GetManifestProgramURL)(PP_Instance instance, | 305 PP_Bool (*GetManifestProgramURL)(PP_Instance instance, |
| 304 struct PP_Var* full_url, | 306 struct PP_Var* full_url, |
| 305 struct PP_PNaClOptions* pnacl_options, | 307 struct PP_PNaClOptions* pnacl_options, |
| 306 PP_Bool* uses_nonsfi_mode); | 308 PP_Bool* uses_nonsfi_mode); |
| 307 /* Returns the filenames for the llc and ld tools. */ | 309 /* Returns the filenames for the llc and ld tools. */ |
| 308 PP_Bool (*GetPnaclResourceInfo)(PP_Instance instance, | 310 PP_Bool (*GetPnaclResourceInfo)(PP_Instance instance, |
| 309 struct PP_Var* llc_tool_name, | 311 struct PP_Var* llc_tool_name, |
| 310 struct PP_Var* ld_tool_name); | 312 struct PP_Var* ld_tool_name, |
| 313 struct PP_Var* subzero_tool_name); |
| 311 /* PP_Var string of attributes describing the CPU features supported | 314 /* PP_Var string of attributes describing the CPU features supported |
| 312 * by the current architecture. The string is a comma-delimited list | 315 * by the current architecture. The string is a comma-delimited list |
| 313 * of attributes supported by LLVM in its -mattr= option: | 316 * of attributes supported by LLVM in its -mattr= option: |
| 314 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */ | 317 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */ |
| 315 struct PP_Var (*GetCpuFeatureAttrs)(void); | 318 struct PP_Var (*GetCpuFeatureAttrs)(void); |
| 316 /* Downloads the .nexe file at the given URL to a file, and sets |file_info| | 319 /* Downloads the .nexe file at the given URL to a file, and sets |file_info| |
| 317 * to information for a handle to a file containing its contents. | 320 * to information for a handle to a file containing its contents. |
| 318 * If metadata for identity-based validation caching is available | 321 * If metadata for identity-based validation caching is available |
| 319 * then it sets token information in |file_info| (otherwise left untouched). | 322 * then it sets token information in |file_info| (otherwise left untouched). |
| 320 */ | 323 */ |
| (...skipping 20 matching lines...) Expand all Loading... |
| 341 * Fetches the content at |pexe_url| for the given instance and opt_level. | 344 * Fetches the content at |pexe_url| for the given instance and opt_level. |
| 342 * If a translated cached nexe is already available, |cache_hit_handle| | 345 * If a translated cached nexe is already available, |cache_hit_handle| |
| 343 * is set and |cache_hit_callback| is called. | 346 * is set and |cache_hit_callback| is called. |
| 344 * Otherwise, |stream_callback| is called repeatedly with blocks of data | 347 * Otherwise, |stream_callback| is called repeatedly with blocks of data |
| 345 * as they are received. |stream_finished_callback| is called after all | 348 * as they are received. |stream_finished_callback| is called after all |
| 346 * data has been received and dispatched to |stream_callback|. | 349 * data has been received and dispatched to |stream_callback|. |
| 347 */ | 350 */ |
| 348 void (*StreamPexe)(PP_Instance instance, | 351 void (*StreamPexe)(PP_Instance instance, |
| 349 const char* pexe_url, | 352 const char* pexe_url, |
| 350 int32_t opt_level, | 353 int32_t opt_level, |
| 354 PP_Bool use_subzero, |
| 351 const struct PPP_PexeStreamHandler_1_0* stream_handler, | 355 const struct PPP_PexeStreamHandler_1_0* stream_handler, |
| 352 void* stream_handler_user_data); | 356 void* stream_handler_user_data); |
| 353 }; | 357 }; |
| 354 /** | 358 /** |
| 355 * @} | 359 * @} |
| 356 */ | 360 */ |
| 357 | 361 |
| 358 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ | 362 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ |
| 359 | 363 |
| OLD | NEW |