Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: ppapi/api/private/ppb_nacl_private.idl

Issue 294633003: Pepper: Move StreamAsFile out of trusted plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes for bbudge Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | ppapi/c/private/ppb_nacl_private.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 5
6 /* This file contains NaCl private interfaces. This interface is not versioned 6 /* This file contains NaCl private interfaces. This interface is not versioned
7 * and is for internal Chrome use. It may change without notice. */ 7 * and is for internal Chrome use. It may change without notice. */
8 8
9 label Chrome { 9 label Chrome {
10 M25 = 1.0 10 M25 = 1.0
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 /* Called when irt_open_resource() is invoked in the NaCl plugin. 160 /* Called when irt_open_resource() is invoked in the NaCl plugin.
161 * Upon completion, callback will be invoked with given callback_user_data 161 * Upon completion, callback will be invoked with given callback_user_data
162 * and the result file handle (or PP_kInvalidFileHandle on error). */ 162 * and the result file handle (or PP_kInvalidFileHandle on error). */
163 PP_Bool OpenResource([inout] mem_t user_data, 163 PP_Bool OpenResource([inout] mem_t user_data,
164 [in] str_t entry_key, 164 [in] str_t entry_key,
165 [in] PP_OpenResourceCompletionCallback callback, 165 [in] PP_OpenResourceCompletionCallback callback,
166 [inout] mem_t callback_user_data); 166 [inout] mem_t callback_user_data);
167 }; 167 };
168 168
169 /* Corresponds to NaClFileInfo in
170 * native_client/src/trusted/validator/nacl_file_info.h */
171 struct PP_NaClFileInfo {
172 PP_FileHandle handle;
173
174 /* See NaClFileToken comment in nacl_file_info.h */
175 uint64_t token_lo;
176 uint64_t token_hi;
177 };
178
169 /* PPB_NaCl_Private */ 179 /* PPB_NaCl_Private */
170 interface PPB_NaCl_Private { 180 interface PPB_NaCl_Private {
171 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success 181 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success
172 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on 182 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on
173 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface 183 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface
174 * returns 'Dev' interfaces to the NaCl plugin. The |uses_ppapi| flag 184 * returns 'Dev' interfaces to the NaCl plugin. The |uses_ppapi| flag
175 * indicates that the nexe run by sel_ldr will use the PPAPI APIs. 185 * indicates that the nexe run by sel_ldr will use the PPAPI APIs.
176 * This implies that LaunchSelLdr is run from the main thread. If a nexe 186 * This implies that LaunchSelLdr is run from the main thread. If a nexe
177 * does not need PPAPI, then it can run off the main thread. 187 * does not need PPAPI, then it can run off the main thread.
178 * The |uses_irt| flag indicates whether the IRT should be loaded in this 188 * The |uses_irt| flag indicates whether the IRT should be loaded in this
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 * browser may then store the translation in the cache. The renderer 284 * browser may then store the translation in the cache. The renderer
275 * must first have called GetNexeFd for the same instance. (The browser is 285 * must first have called GetNexeFd for the same instance. (The browser is
276 * not guaranteed to store the nexe even if |success| is true; if there is 286 * not guaranteed to store the nexe even if |success| is true; if there is
277 * an error on the browser side, or the file is too big for the cache, or 287 * an error on the browser side, or the file is too big for the cache, or
278 * the browser is in incognito mode, no notification will be delivered to 288 * the browser is in incognito mode, no notification will be delivered to
279 * the plugin.) 289 * the plugin.)
280 */ 290 */
281 void ReportTranslationFinished([in] PP_Instance instance, 291 void ReportTranslationFinished([in] PP_Instance instance,
282 [in] PP_Bool success); 292 [in] PP_Bool success);
283 293
284 /* Opens a NaCl executable file in the application's extension directory
285 * corresponding to the file URL and returns a file descriptor, or an invalid
286 * handle on failure. |metadata| is left unchanged on failure.
287 */
288 PP_FileHandle OpenNaClExecutable([in] PP_Instance instance,
289 [in] str_t file_url,
290 [out] uint64_t file_token_lo,
291 [out] uint64_t file_token_hi);
292
293
294 /* Dispatch a progress event on the DOM element where the given instance is 294 /* Dispatch a progress event on the DOM element where the given instance is
295 * embedded. 295 * embedded.
296 */ 296 */
297 void DispatchEvent([in] PP_Instance instance, 297 void DispatchEvent([in] PP_Instance instance,
298 [in] PP_NaClEventType event_type, 298 [in] PP_NaClEventType event_type,
299 [in] str_t resource_url, 299 [in] str_t resource_url,
300 [in] PP_Bool length_is_computable, 300 [in] PP_Bool length_is_computable,
301 [in] uint64_t loaded_bytes, 301 [in] uint64_t loaded_bytes,
302 [in] uint64_t total_bytes); 302 [in] uint64_t total_bytes);
303 303
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 int64_t GetNexeSize([in] PP_Instance instance); 366 int64_t GetNexeSize([in] PP_Instance instance);
367 367
368 /* Performs accounting for requesting the NaCl manifest at the given URL. */ 368 /* Performs accounting for requesting the NaCl manifest at the given URL. */
369 void RequestNaClManifest([in] PP_Instance instance, 369 void RequestNaClManifest([in] PP_Instance instance,
370 [in] str_t manifest_url, 370 [in] str_t manifest_url,
371 [out] int32_t manifest_id, 371 [out] int32_t manifest_id,
372 [in] PP_CompletionCallback callback); 372 [in] PP_CompletionCallback callback);
373 373
374 PP_Var GetManifestBaseURL([in] PP_Instance instance); 374 PP_Var GetManifestBaseURL([in] PP_Instance instance);
375 375
376 PP_Bool ResolvesRelativeToPluginBaseUrl([in] PP_Instance instance,
377 [in] str_t url);
378
379 /* Processes the NaCl manifest once it's been retrieved. 376 /* Processes the NaCl manifest once it's been retrieved.
380 * TODO(teravest): Move the rest of the supporting logic out of the trusted 377 * TODO(teravest): Move the rest of the supporting logic out of the trusted
381 * plugin. 378 * plugin.
382 */ 379 */
383 void ProcessNaClManifest([in] PP_Instance instance, 380 void ProcessNaClManifest([in] PP_Instance instance,
384 [in] str_t program_url); 381 [in] str_t program_url);
385 382
386 /* Returns the manifest url as passed as a plugin argument. */ 383 /* Returns the manifest url as passed as a plugin argument. */
387 PP_Var GetManifestURLArgument([in] PP_Instance instance); 384 PP_Var GetManifestURLArgument([in] PP_Instance instance);
388 385
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 * to a handle to a file containing its contents. 426 * to a handle to a file containing its contents.
430 * If metadata for identity-based validation caching is available 427 * If metadata for identity-based validation caching is available
431 * then it sets file_token_lo and file_token_lo (otherwise left untouched). 428 * then it sets file_token_lo and file_token_lo (otherwise left untouched).
432 */ 429 */
433 void DownloadNexe([in] PP_Instance instance, 430 void DownloadNexe([in] PP_Instance instance,
434 [in] str_t url, 431 [in] str_t url,
435 [out] PP_FileHandle handle, 432 [out] PP_FileHandle handle,
436 [out] uint64_t file_token_lo, 433 [out] uint64_t file_token_lo,
437 [out] uint64_t file_token_hi, 434 [out] uint64_t file_token_hi,
438 [in] PP_CompletionCallback callback); 435 [in] PP_CompletionCallback callback);
436
437 /* Downloads a non-nexe file specified in the manifest, and sets |file_info|
438 * to corresponding information about the file. */
439 void DownloadFile([in] PP_Instance instance,
440 [in] str_t url,
441 [out] PP_NaClFileInfo file_info,
442 [in] PP_CompletionCallback callback);
439 }; 443 };
OLDNEW
« no previous file with comments | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | ppapi/c/private/ppb_nacl_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698