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.
7 * This file defines the <code>PPB_Buffer_Dev</code> interface.
14 interface PPB_Buffer_Dev
{
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
18 * handle was invalid. The buffer will be initialized to contain zeroes.
21 [in] PP_Instance instance
,
22 [in] uint32_t size_in_bytes
);
25 * Returns PP_TRUE if the given resource is a Buffer. Returns PP_FALSE if the
26 * resource is invalid or some type other than a Buffer.
29 [in] PP_Resource resource
);
32 * Gets the size of the buffer. Returns PP_TRUE on success, PP_FALSE
33 * if the resource is not a buffer. On failure, |*size_in_bytes| is not set.
36 [in] PP_Resource resource
,
37 [out] uint32_t size_in_bytes
);
40 * Maps this buffer into the plugin address space and returns a pointer to
41 * the beginning of the data.
44 [in] PP_Resource resource
);
50 [in] PP_Resource resource
);