Delete unused downloads page asset.
[chromium-blink-merge.git] / ppapi / c / pp_resource.h
blobd63e13d560df2dbdc3d15946f306b4ba9d1984c2
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
3 * found in the LICENSE file.
4 */
6 /* From pp_resource.idl modified Thu Mar 28 10:09:51 2013. */
8 #ifndef PPAPI_C_PP_RESOURCE_H_
9 #define PPAPI_C_PP_RESOURCE_H_
11 #include "ppapi/c/pp_macros.h"
12 #include "ppapi/c/pp_stdint.h"
14 /**
15 * @file
16 * This file defines the <code>PP_Resource</code> type which represents data
17 * associated with the module.
21 /**
22 * @addtogroup Typedefs
23 * @{
25 /**
26 * This typedef represents an opaque handle assigned by the browser to the
27 * resource. The handle is guaranteed never to be 0 for a valid resource, so a
28 * module can initialize it to 0 to indicate a "NULL handle." Some interfaces
29 * may return a NULL resource to indicate failure.
31 * While a Var represents something callable to JS or from the module to
32 * the DOM, a resource has no meaning or visibility outside of the module
33 * interface.
35 * Resources are reference counted. Use <code>AddRefResource()</code>
36 * and <code>ReleaseResource()</code> in <code>ppb_core.h</code> to manage the
37 * reference count of a resource. The data will be automatically destroyed when
38 * the internal reference count reaches 0.
40 typedef int32_t PP_Resource;
41 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Resource, 4);
42 /**
43 * @}
46 #endif /* PPAPI_C_PP_RESOURCE_H_ */