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

Side by Side Diff: ppapi/c/dev/ppb_buffer_dev.h

Issue 5410001: Change trusted shared memory interface to match audio.... (Closed) Base URL: svn://chrome-svn/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
« no previous file with comments | « no previous file | ppapi/c/trusted/ppb_image_data_trusted.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DEV_PPB_BUFFER_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_BUFFER_DEV_H_
6 #define PPAPI_C_DEV_PPB_BUFFER_DEV_H_ 6 #define PPAPI_C_DEV_PPB_BUFFER_DEV_H_
7 7
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_module.h" 9 #include "ppapi/c/pp_module.h"
10 #include "ppapi/c/pp_resource.h" 10 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/c/pp_stdint.h" 11 #include "ppapi/c/pp_stdint.h"
12 12
13 #define PPB_BUFFER_DEV_INTERFACE "PPB_Buffer(Dev);0.2" 13 #define PPB_BUFFER_DEV_INTERFACE "PPB_Buffer(Dev);0.3"
14 14
15 struct PPB_Buffer_Dev { 15 struct PPB_Buffer_Dev {
16 // Allocates a buffer of the given size in bytes. The return value will have 16 // Allocates a buffer of the given size in bytes. The return value will have
17 // a non-zero ID on success, or zero on failure. Failure means the module 17 // a non-zero ID on success, or zero on failure. Failure means the module
18 // handle was invalid. The buffer will be initialized to contain zeroes. 18 // handle was invalid. The buffer will be initialized to contain zeroes.
19 PP_Resource (*Create)(PP_Module module, int32_t size_in_bytes); 19 PP_Resource (*Create)(PP_Module module, uint32_t size_in_bytes);
20 20
21 // Returns PP_TRUE if the given resource is a Buffer. Returns PP_FALSE if the 21 // Returns PP_TRUE if the given resource is a Buffer. Returns PP_FALSE if the
22 // resource is invalid or some type other than a Buffer. 22 // resource is invalid or some type other than a Buffer.
23 PP_Bool (*IsBuffer)(PP_Resource resource); 23 PP_Bool (*IsBuffer)(PP_Resource resource);
24 24
25 // Gets the size of the buffer. Returns PP_TRUE on success, PP_FALSE 25 // Gets the size of the buffer. Returns PP_TRUE on success, PP_FALSE
26 // if the resource is not a buffer. On failure, |*size_in_bytes| is not set. 26 // if the resource is not a buffer. On failure, |*size_in_bytes| is not set.
27 PP_Bool (*Describe)(PP_Resource resource, int32_t* size_in_bytes); 27 PP_Bool (*Describe)(PP_Resource resource, uint32_t* size_in_bytes);
28 28
29 // Maps this buffer into the plugin address space and returns a pointer to the 29 // Maps this buffer into the plugin address space and returns a pointer to the
30 // beginning of the data. 30 // beginning of the data.
31 void* (*Map)(PP_Resource resource); 31 void* (*Map)(PP_Resource resource);
32 32
33 void (*Unmap)(PP_Resource resource); 33 void (*Unmap)(PP_Resource resource);
34 }; 34 };
35 35
36 #endif // PPAPI_C_DEV_PPB_BUFFER_DEV_H_ 36 #endif // PPAPI_C_DEV_PPB_BUFFER_DEV_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/trusted/ppb_image_data_trusted.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698