resource_var.cc revision 58537e28ecd584eab876aee8be7156509866d23a
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.
4
5#include "ppapi/shared_impl/resource_var.h"
6
7namespace ppapi {
8
9ResourceVar::ResourceVar() : pp_resource_(0) {}
10
11ResourceVar::ResourceVar(PP_Resource pp_resource) : pp_resource_(pp_resource) {}
12
13ResourceVar::ResourceVar(const IPC::Message& creation_message)
14    : pp_resource_(0),
15      creation_message_(creation_message) {}
16
17ResourceVar::~ResourceVar() {}
18
19ResourceVar* ResourceVar::AsResourceVar() {
20  return this;
21}
22
23PP_VarType ResourceVar::GetType() const {
24  // TODO(mgiuca): Return PP_VARTYPE_RESOURCE, once that is a valid enum value.
25  NOTREACHED();
26  return PP_VARTYPE_UNDEFINED;
27}
28
29// static
30ResourceVar* ResourceVar::FromPPVar(PP_Var var) {
31  // TODO(mgiuca): Implement this function, once PP_VARTYPE_RESOURCE is
32  // introduced.
33  return NULL;
34}
35
36}  // namespace ppapi
37