diff options
author | neb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-30 17:37:54 +0000 |
---|---|---|
committer | neb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-30 17:37:54 +0000 |
commit | 2272ed3505a36c7d1543f24b770ea85dcfee8640 (patch) | |
tree | 91bc7c2235c7d07b65f16e2b78f49382d863fb0b /ppapi/api/trusted | |
parent | f917b80b0878fe92ca856696af2dc47a0f5e1c55 (diff) | |
download | chromium_src-2272ed3505a36c7d1543f24b770ea85dcfee8640.zip chromium_src-2272ed3505a36c7d1543f24b770ea85dcfee8640.tar.gz chromium_src-2272ed3505a36c7d1543f24b770ea85dcfee8640.tar.bz2 |
IDL version of PPAPI interfaces.
BUG=none
TEST=none yet... soon.
Review URL: http://codereview.chromium.org/6726041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api/trusted')
-rw-r--r-- | ppapi/api/trusted/ppb_audio_trusted.idl | 43 | ||||
-rw-r--r-- | ppapi/api/trusted/ppb_image_data_trusted.idl | 20 | ||||
-rw-r--r-- | ppapi/api/trusted/ppb_url_loader_trusted.idl | 40 |
3 files changed, 103 insertions, 0 deletions
diff --git a/ppapi/api/trusted/ppb_audio_trusted.idl b/ppapi/api/trusted/ppb_audio_trusted.idl new file mode 100644 index 0000000..775ef15 --- /dev/null +++ b/ppapi/api/trusted/ppb_audio_trusted.idl @@ -0,0 +1,43 @@ +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* This file defines the trusted audio interface. */ + +/* This interface is to be used by proxy implementations. All + * functions should be called from the main thread only. The + * resource returned is an Audio resource; most of the PPB_Audio + * interface is also usable on this resource. + */ +[mainthread] interface PPB_AudioTrusted_0_5 { + /* Returns an audio resource. */ + PP_Resource CreateTrusted( + [in] PP_Instance instance); + + /* Opens a paused audio interface, used by trusted side of proxy. + * Returns PP_ERROR_WOULD_BLOCK on success, and invokes + * the |create_callback| asynchronously to complete. + * As this function should always be invoked from the main thread, + * do not use the blocking variant of PP_CompletionCallback. + */ + int32_t Open( + [in] PP_Resource audio, + [in] PP_Resource config, + [in] PP_CompletionCallback create_callback); + + /* Get the sync socket. Use once Open has completed. + * Returns PP_OK on success. + */ + int32_t GetSyncSocket( + [in] PP_Resource audio, + [out] handle_t sync_socket); + + /* Get the shared memory interface. Use once Open has completed. + * Returns PP_OK on success. + */ + int32_t GetSharedMemory( + [in] PP_Resource audio, + [out] handle_t shm_handle, + [out] uint32_t shm_size); +}; diff --git a/ppapi/api/trusted/ppb_image_data_trusted.idl b/ppapi/api/trusted/ppb_image_data_trusted.idl new file mode 100644 index 0000000..d9339c4 --- /dev/null +++ b/ppapi/api/trusted/ppb_image_data_trusted.idl @@ -0,0 +1,20 @@ +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* This file defines the trusted ImageData interface. */ + +/* Trusted interface */ +interface PPB_ImageDataTrusted_0_4 { + /* Returns the internal shared memory pointer associated with the given + * ImageData resource. Used for proxying. Returns PP_OK on success, or + * PP_ERROR_* on failure. On success, the size in bytes of the shared + * memory region will be placed into |*byte_count|, and the handle for + * the shared memory in |*handle|. + */ + int32_t GetSharedMemory( + [in] PP_Resource image_data, + [out] handle_t handle, + [out] uint32_t byte_count); +}; diff --git a/ppapi/api/trusted/ppb_url_loader_trusted.idl b/ppapi/api/trusted/ppb_url_loader_trusted.idl new file mode 100644 index 0000000..1deafa8 --- /dev/null +++ b/ppapi/api/trusted/ppb_url_loader_trusted.idl @@ -0,0 +1,40 @@ +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* URL loader trusted interfaces. */ + +/* Callback that indicates the status of the download and upload for the + * given URLLoader resource. + */ +typedef void PP_URLLoaderTrusted_StatusCallback( + PP_Instance pp_instance, + PP_Resource pp_resource, + int64_t bytes_sent, + int64_t total_bytes_to_be_sent, + int64_t bytes_received, + int64_t total_bytes_to_be_received); + +/* Available only to trusted implementations. */ +interface PPB_URLLoaderTrusted_0_3 { + /* Grant this URLLoader the capability to make unrestricted cross-origin + * requests. */ + void GrantUniversalAccess(PP_Resource loader); + + /* Registers that the given function will be called when the upload or + * downloaded byte count has changed. This is not exposed on the untrusted + * interface because it can be quite chatty and encourages people to write + * feedback UIs that update as frequently as the progress updates. + * + * The other serious gotcha with this callback is that the callback must not + * mutate the URL loader or cause it to be destroyed. + * + * However, the proxy layer needs this information to push to the other + * process, so we expose it here. Only one callback can be set per URL + * Loader. Setting to a NULL callback will disable it. + */ + void RegisterStatusCallback( + [in] PP_Resource loader, + [in] PP_URLLoaderTrusted_StatusCallback cb); +}; |