Home | History | Annotate | Download | only in shared_impl

Lines Matching refs:RESOURCE

19 // All resource types should be added here. This implements our hand-rolled
97 // Forward declare all the resource APIs.
99 #define DECLARE_RESOURCE_CLASS(RESOURCE) class RESOURCE;
105 // in-process ("impl") resource in the host (renderer) process, or when they're
106 // a proxied resource in the plugin process. This enum differentiates those
113 class PPAPI_SHARED_EXPORT Resource : public base::RefCounted<Resource> {
118 // associated instance, and generates a new resource ID. The host resource
119 // will be the same as the newly-generated resource ID. For all objects in
125 // host. If you have a host resource ID, use the constructor below which
127 Resource(ResourceObjectType type, PP_Instance instance);
129 // For constructing given a host resource.
131 // For OBJECT_IS_PROXY objects, this takes the resource generated in the host
132 // side, stores it, and allocates a "local" resource ID for use in the
135 // For OBJECT_IS_IMPL, the host resource ID must be 0, since there should be
136 // no host resource generated (impl objects should generate their own). The
138 // some shared objects use a host resource for both modes to keep things the
140 Resource(ResourceObjectType type, const HostResource& host_resource);
145 // PPB_MessageLoop resource for the main thread.
147 explicit Resource(Untracked);
149 virtual ~Resource();
153 // Returns the resource ID for this object in the current process without
157 // Returns the host resource which identifies the resource in the host side
159 // this just identifies the in-process resource ID & instance.
162 // Adds a ref on behalf of the plugin and returns the resource ID. This is
163 // normally used when returning a resource to the plugin, where it's
164 // expecting the returned resource to have ownership of a ref passed.
168 // Called by the resource tracker when the last reference from the plugin
169 // was released. For a few types of resources, the resource could still
177 // Called by the resource tracker when the instance is going away but the
180 // resource alive.
182 // You will want to override this if your resource does some kind of
193 #define DEFINE_TYPE_GETTER(RESOURCE) \
194 virtual thunk::RESOURCE* As##RESOURCE();
200 // resource (or if a developer forgets to add the resource to the list in
218 // Logs a message to the console from this resource.
221 // Removes the resource from the ResourceTracker's tables. This normally
222 // happens as part of Resource destruction, but if a subclass destructor
225 // with the destruction. If the resource is not in the ResourceTracker's
238 DISALLOW_IMPLICIT_CONSTRUCTORS(Resource);
243 #define DEFINE_RESOURCE_CAST(RESOURCE) \
244 template<> inline thunk::RESOURCE* Resource::GetAs() { \
245 return As##RESOURCE(); \