5 #ifndef PPAPI_CPP_RESOURCE_H_
6 #define PPAPI_CPP_RESOURCE_H_
8 #include "ppapi/c/pp_resource.h"
45 bool is_null()
const {
return !pp_resource_; }
47 PP_Resource pp_resource()
const {
return pp_resource_; }
64 explicit Resource(PP_Resource resource);
92 PP_Resource pp_resource_;
98 return lhs.pp_resource() == rhs.pp_resource();
102 return !(lhs == rhs);
105 #endif // PPAPI_CPP_RESOURCE_H_
void PassRefFromConstructor(PP_Resource resource)
Resource()
The default constructor.
Resource & operator=(const Resource &other)
virtual ~Resource()
Destructor.
PassRef
Definition: pass_ref.h:17
bool is_null() const
Definition: resource.h:45
A reference counted module resource.
Definition: resource.h:20
bool operator!=(const pp::Point &lhs, const pp::Point &rhs)
Definition: point.h:313
void Clear()
Sets this resource to null. This releases ownership of the resource.
bool operator==(const pp::Point &lhs, const pp::Point &rhs)
Definition: point.h:302