| Index: ppapi/shared_impl/var.cc
|
| diff --git a/ppapi/shared_impl/var.cc b/ppapi/shared_impl/var.cc
|
| index e3ea224de4b746566c7d06a5ff83dad9ba031eae..6b99d980abe232e81b21f9e962905da9f5826ecd 100644
|
| --- a/ppapi/shared_impl/var.cc
|
| +++ b/ppapi/shared_impl/var.cc
|
| @@ -91,6 +91,10 @@ DictionaryVar* Var::AsDictionaryVar() {
|
| return NULL;
|
| }
|
|
|
| +ResourceVar* Var::AsResourceVar() {
|
| + return NULL;
|
| +}
|
| +
|
| PP_Var Var::GetPPVar() {
|
| int32 id = GetOrCreateVarID();
|
| if (!id)
|
| @@ -207,5 +211,46 @@ ArrayBufferVar* ArrayBufferVar::FromPPVar(PP_Var var) {
|
| return var_object->AsArrayBufferVar();
|
| }
|
|
|
| +// ResourceVar -----------------------------------------------------------------
|
| +
|
| +ResourceInfo::ResourceInfo()
|
| + : pending_renderer_id(0),
|
| + resource_id(0),
|
| + file_system_type(PP_FILESYSTEMTYPE_INVALID) {
|
| +}
|
| +
|
| +ResourceVar::ResourceVar() {}
|
| +
|
| +ResourceVar::~ResourceVar() {}
|
| +
|
| +void ResourceVar::SetPendingId(int pending_renderer_id) {
|
| + data_.pending_renderer_id = pending_renderer_id;
|
| +}
|
| +
|
| +void ResourceVar::SetResourceId(int resource_id) {
|
| + data_.resource_id = resource_id;
|
| +}
|
| +
|
| +void ResourceVar::SetFileSystemType(PP_FileSystemType file_system_type) {
|
| + data_.file_system_type = file_system_type;
|
| +}
|
| +
|
| +ResourceVar* ResourceVar::AsResourceVar() {
|
| + return this;
|
| +}
|
| +
|
| +PP_VarType ResourceVar::GetType() const {
|
| + // TODO(mgiuca): Return PP_VARTYPE_RESOURCE, once that is a valid enum value.
|
| + NOTREACHED();
|
| + return PP_VARTYPE_UNDEFINED;
|
| +}
|
| +
|
| +// static
|
| +ResourceVar* ResourceVar::FromPPVar(PP_Var var) {
|
| + // TODO(mgiuca): Implement this function, once PP_VARTYPE_RESOURCE is
|
| + // introduced.
|
| + return NULL;
|
| +}
|
| +
|
| } // namespace ppapi
|
|
|
|
|