1 /* Copyright 2013 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_VarResource</code> struct providing
8 * a way to interact with resource vars.
15 [macro
="PPB_VAR_RESOURCE_DEV_INTERFACE"]
16 interface PPB_VarResource_Dev
{
18 * Converts a resource-type var to a <code>PP_Resource</code>.
20 * @param[in] var A <code>PP_Var</code> struct containing a resource-type var.
22 * @return A <code>PP_Resource</code> retrieved from the var, or 0 if the var
23 * is not a resource. The reference count of the resource is incremented on
24 * behalf of the caller.
26 PP_Resource VarToResource
([in] PP_Var var
);
29 * Creates a new <code>PP_Var</code> from a given resource.
31 * @param[in] resource A <code>PP_Resource</code> to be wrapped in a var.
33 * @return A <code>PP_Var</code> created for this resource, with type
34 * <code>PP_VARTYPE_RESOURCE</code>. The reference count of the var is set to
35 * 1 on behalf of the caller.
37 PP_Var VarFromResource
([in] PP_Resource resource
);