diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-11 20:45:01 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-11 20:45:01 +0000 |
commit | 502ec4dda4411088ac46b55754a027235e4b9217 (patch) | |
tree | 97a150aca10c22b5b24060a5194164e636521d40 /ppapi/c | |
parent | 84734df4b93aa0e7d01313b17ff190022dcca8bf (diff) | |
download | chromium_src-502ec4dda4411088ac46b55754a027235e4b9217.zip chromium_src-502ec4dda4411088ac46b55754a027235e4b9217.tar.gz chromium_src-502ec4dda4411088ac46b55754a027235e4b9217.tar.bz2 |
Add an asynchronous version of the Flash DeviceID API.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10535062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r-- | ppapi/c/private/ppb_flash.h | 1 | ||||
-rw-r--r-- | ppapi/c/private/ppb_flash_device_id.h | 50 |
2 files changed, 51 insertions, 0 deletions
diff --git a/ppapi/c/private/ppb_flash.h b/ppapi/c/private/ppb_flash.h index 1bde87b..94b4f85 100644 --- a/ppapi/c/private/ppb_flash.h +++ b/ppapi/c/private/ppb_flash.h @@ -175,6 +175,7 @@ struct PPB_Flash_12_4 { void (*UpdateActivity)(PP_Instance instance); /** * Returns the device ID as a string. Returns a PP_VARTYPE_UNDEFINED on error. + * Deprecated, use GetDeviceIDAsync. */ struct PP_Var (*GetDeviceID)(PP_Instance instance); /** diff --git a/ppapi/c/private/ppb_flash_device_id.h b/ppapi/c/private/ppb_flash_device_id.h new file mode 100644 index 0000000..33d1ba7 --- /dev/null +++ b/ppapi/c/private/ppb_flash_device_id.h @@ -0,0 +1,50 @@ +/* Copyright (c) 2012 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. + */ + +/* From private/ppb_flash_device_id.idl modified Fri Jun 1 15:21:17 2012. */ + +#ifndef PPAPI_C_PRIVATE_PPB_FLASH_DEVICE_ID_H_ +#define PPAPI_C_PRIVATE_PPB_FLASH_DEVICE_ID_H_ + +#include "ppapi/c/pp_bool.h" +#include "ppapi/c/pp_completion_callback.h" +#include "ppapi/c/pp_instance.h" +#include "ppapi/c/pp_macros.h" +#include "ppapi/c/pp_resource.h" +#include "ppapi/c/pp_stdint.h" +#include "ppapi/c/pp_var.h" + +#define PPB_FLASH_DEVICEID_INTERFACE_1_0 "PPB_Flash_DeviceID;1.0" +#define PPB_FLASH_DEVICEID_INTERFACE PPB_FLASH_DEVICEID_INTERFACE_1_0 + +/** + * @file + * This file contains the <code>PPB_Flash_DeviceID</code> interface. + */ + + +/** + * @addtogroup Interfaces + * @{ + */ +struct PPB_Flash_DeviceID_1_0 { + PP_Resource (*Create)(PP_Instance instance); + /** + * Asynchronously computes the device ID. When available, it will place the + * string in |*id| and will call the completion callback. On failure the + * given var will be PP_VARTYPE_UNDEFINED. + */ + int32_t (*GetDeviceID)(PP_Resource device_id, + struct PP_Var* id, + struct PP_CompletionCallback callback); +}; + +typedef struct PPB_Flash_DeviceID_1_0 PPB_Flash_DeviceID; +/** + * @} + */ + +#endif /* PPAPI_C_PRIVATE_PPB_FLASH_DEVICE_ID_H_ */ + |