#ifndef PPAPI_SHARED_IMPL_SCOPED_PP_VAR_H_
#define PPAPI_SHARED_IMPL_SCOPED_PP_VAR_H_
#include "ppapi/c/pp_var.h"
#include "ppapi/shared_impl/ppapi_shared_export.h"
namespace ppapi {
class PPAPI_SHARED_EXPORT ScopedPPVar {
public:
struct PassRef {};
ScopedPPVar();
explicit ScopedPPVar(const PP_Var& v);
ScopedPPVar(const PassRef&, const PP_Var& v);
ScopedPPVar(const ScopedPPVar& other);
~ScopedPPVar();
ScopedPPVar& operator=(const PP_Var& r);
ScopedPPVar& operator=(const ScopedPPVar& other) {
return operator=(other.var_);
}
const PP_Var& get() const { return var_; }
PP_Var Release();
private:
PP_Var var_;
};
}
#endif