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

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

Issue 14588009: PPAPI/NaCl: Move event dispatching from the plugin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use the right Context and Isolate. Created 7 years, 1 month 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
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
11 }; 11 };
12 12
13 #inline c 13 #inline c
14 #include "ppapi/c/private/pp_file_handle.h" 14 #include "ppapi/c/private/pp_file_handle.h"
15 #include "ppapi/c/private/ppb_instance_private.h" 15 #include "ppapi/c/private/ppb_instance_private.h"
16 #endinl 16 #endinl
17 17
18 /** NaCl-specific errors that should be reported to the user */ 18 /** NaCl-specific errors that should be reported to the user */
19 enum PP_NaClError { 19 enum PP_NaClError {
20 /** 20 /**
21 * The manifest program element does not contain a program usable on the 21 * The manifest program element does not contain a program usable on the
22 * user's architecture 22 * user's architecture
23 */ 23 */
24 PP_NACL_MANIFEST_MISSING_ARCH = 0 24 PP_NACL_MANIFEST_MISSING_ARCH = 0
25 }; 25 };
26 26
27 /** Event types that NaCl may use when reporting load progress or errors. */
28 enum PP_NaClEventType {
29 PP_NACL_EVENT_LOADSTART,
30 PP_NACL_EVENT_PROGRESS,
31 PP_NACL_EVENT_ERROR,
32 PP_NACL_EVENT_ABORT,
33 PP_NACL_EVENT_LOAD,
34 PP_NACL_EVENT_LOADEND,
35 PP_NACL_EVENT_CRASH
36 };
37
27 /* PPB_NaCl_Private */ 38 /* PPB_NaCl_Private */
28 interface PPB_NaCl_Private { 39 interface PPB_NaCl_Private {
29 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success 40 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success
30 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on 41 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on
31 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface 42 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface
32 * returns 'Dev' interfaces to the NaCl plugin. The |uses_ppapi| flag 43 * returns 'Dev' interfaces to the NaCl plugin. The |uses_ppapi| flag
33 * indicates that the nexe run by sel_ldr will use the PPAPI APIs. 44 * indicates that the nexe run by sel_ldr will use the PPAPI APIs.
34 * This implies that LaunchSelLdr is run from the main thread. If a nexe 45 * This implies that LaunchSelLdr is run from the main thread. If a nexe
35 * does not need PPAPI, then it can run off the main thread. 46 * does not need PPAPI, then it can run off the main thread.
36 * The |uses_irt| flag indicates whether the IRT should be loaded in this 47 * The |uses_irt| flag indicates whether the IRT should be loaded in this
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 [in] PP_NaClError message_id); 163 [in] PP_NaClError message_id);
153 164
154 /* Opens a NaCl executable file in the application's extension directory 165 /* Opens a NaCl executable file in the application's extension directory
155 * corresponding to the file URL and returns a file descriptor, or an invalid 166 * corresponding to the file URL and returns a file descriptor, or an invalid
156 * handle on failure. |metadata| is left unchanged on failure. 167 * handle on failure. |metadata| is left unchanged on failure.
157 */ 168 */
158 PP_FileHandle OpenNaClExecutable([in] PP_Instance instance, 169 PP_FileHandle OpenNaClExecutable([in] PP_Instance instance,
159 [in] str_t file_url, 170 [in] str_t file_url,
160 [out] uint64_t file_token_lo, 171 [out] uint64_t file_token_lo,
161 [out] uint64_t file_token_hi); 172 [out] uint64_t file_token_hi);
173
174
175 /* Dispatch a progress event on the DOM element where the given instance is
176 * embedded.
177 */
178 void DispatchEvent([in] PP_Instance instance,
179 [in] PP_NaClEventType event_type,
180 [in] PP_Var resource_url,
181 [in] PP_Bool length_is_computable,
182 [in] uint64_t loaded_bytes,
183 [in] uint64_t total_bytes);
162 }; 184 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698