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

Side by Side Diff: ppapi/c/pp_resource.h

Issue 5674004: Add compile assertions to enforce the sizes of all structs and enums in the C... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef PPAPI_C_PP_RESOURCE_H_ 5 #ifndef PPAPI_C_PP_RESOURCE_H_
6 #define PPAPI_C_PP_RESOURCE_H_ 6 #define PPAPI_C_PP_RESOURCE_H_
7 7
8 #include "ppapi/c/pp_macros.h"
8 #include "ppapi/c/pp_stdint.h" 9 #include "ppapi/c/pp_stdint.h"
9 10
10 /** 11 /**
11 * @file 12 * @file
12 * Defines the API ... 13 * Defines the API ...
13 * 14 *
14 * @addtogroup PP 15 * @addtogroup PP
15 * @{ 16 * @{
16 */ 17 */
17 18
18 /** 19 /**
19 * A resource is data associated with the Pepper plugin interface. While a 20 * A resource is data associated with the Pepper plugin interface. While a
20 * Var represents something callable to JS or from the plugin to the DOM, a 21 * Var represents something callable to JS or from the plugin to the DOM, a
21 * resource has no meaning or visibility outside of the plugin interface. 22 * resource has no meaning or visibility outside of the plugin interface.
22 * 23 *
23 * Resources are reference counted. Use AddRefResource and ReleaseResource to 24 * Resources are reference counted. Use AddRefResource and ReleaseResource to
24 * manage your reference count of a resource. The data will be automatically 25 * manage your reference count of a resource. The data will be automatically
25 * destroyed when the internal reference count reaches 0. 26 * destroyed when the internal reference count reaches 0.
26 * 27 *
27 * Value is an opaque handle assigned by the browser to the resource. It is 28 * Value is an opaque handle assigned by the browser to the resource. It is
28 * guaranteed never to be 0 for a valid resource, so a plugin can initialize 29 * guaranteed never to be 0 for a valid resource, so a plugin can initialize
29 * it to 0 to indicate a "NULL handle." Some interfaces may return a NULL 30 * it to 0 to indicate a "NULL handle." Some interfaces may return a NULL
30 * resource to indicate failure. 31 * resource to indicate failure.
31 */ 32 */
32 typedef int64_t PP_Resource; 33 typedef int64_t PP_Resource;
34 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Resource, 8);
33 35
34 /** 36 /**
35 * @} 37 * @}
36 * End addtogroup PP 38 * End addtogroup PP
37 */ 39 */
38 40
39 #endif // PPAPI_C_PP_RESOURCE_H_ 41 #endif // PPAPI_C_PP_RESOURCE_H_
OLDNEW
« ppapi/c/dev/pp_video_dev.h ('K') | « ppapi/c/pp_rect.h ('k') | ppapi/c/pp_size.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698