Chromium Code Reviews| Index: ppapi/shared_impl/resource_var.cc |
| diff --git a/ppapi/shared_impl/resource_var.cc b/ppapi/shared_impl/resource_var.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3c9045185c129563228a8fcea0a6862dba03a6b5 |
| --- /dev/null |
| +++ b/ppapi/shared_impl/resource_var.cc |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ppapi/shared_impl/resource_var.h" |
| + |
| +namespace ppapi { |
| + |
| +ResourceVar::ResourceVar() : resource_id_(0) {} |
| + |
| +ResourceVar::ResourceVar(PP_Resource resource_id) : resource_id_(resource_id) {} |
| + |
| +ResourceVar::ResourceVar(const IPC::Message& creation_message) |
| + : creation_message_(creation_message) {} |
|
yzshen1
2013/08/28 17:31:58
You should also init resource_id_.
Matt Giuca
2013/08/29 01:44:47
Done.
|
| + |
| +ResourceVar::~ResourceVar() {} |
| + |
| +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 |