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

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: Merge 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 [in] PP_NaClError message_id); 155 [in] PP_NaClError message_id);
145 156
146 /* Opens a NaCl executable file in the application's extension directory 157 /* Opens a NaCl executable file in the application's extension directory
147 * corresponding to the file URL and returns a file descriptor, or an invalid 158 * corresponding to the file URL and returns a file descriptor, or an invalid
148 * handle on failure. |metadata| is left unchanged on failure. 159 * handle on failure. |metadata| is left unchanged on failure.
149 */ 160 */
150 PP_FileHandle OpenNaClExecutable([in] PP_Instance instance, 161 PP_FileHandle OpenNaClExecutable([in] PP_Instance instance,
151 [in] str_t file_url, 162 [in] str_t file_url,
152 [out] uint64_t file_token_lo, 163 [out] uint64_t file_token_lo,
153 [out] uint64_t file_token_hi); 164 [out] uint64_t file_token_hi);
165
166
167 /* Dispatch a progress event on the DOM element where the given instance is
168 * embedded.
169 */
170 void DispatchEvent([in] PP_Instance instance,
171 [in] PP_NaClEventType event_type,
172 [in] PP_Var resource_url,
173 [in] PP_Bool length_is_computable,
174 [in] uint64_t loaded_bytes,
175 [in] uint64_t total_bytes);
154 }; 176 };
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_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