Lines Matching refs:resource
16 #include "ppapi/shared_impl/resource.h"
32 // If this fails, then the instance or resource ID supplied was invalid.
40 // Resource member functions: EnterResource
41 // Automatically interprets the given PP_Resource as a resource ID and sets
42 // up the resource object for you.
87 explicit EnterBase(PP_Resource resource);
89 EnterBase(PP_Resource resource, const PP_CompletionCallback& callback);
116 // Helper function to return a Resource from a PP_Resource. Having this
119 static Resource* GetResource(PP_Resource resource);
121 // Helper function to return a Resource from a PP_Instance and singleton
122 // resource identifier.
123 static Resource* GetSingletonResource(PP_Instance instance,
128 // Does error handling associated with entering a resource. The resource_base
132 // both resource_base and object is that we can differentiate "bad resource
133 // ID" from "valid resource ID not of the correct type."
138 Resource* resource_base,
147 // For Enter objects that need a resource, we'll store a pointer to the
148 // Resource object so that we don't need to look it up more than once. For
149 // Enter objects with no resource, this will be NULL.
150 Resource* resource_;
177 EnterResource(PP_Resource resource, bool report_error)
178 : EnterBase(resource) {
179 Init(resource, report_error);
181 EnterResource(PP_Resource resource, const PP_CompletionCallback& callback,
183 : EnterBase(resource, callback) {
184 Init(resource, report_error);
189 Resource* resource() { return resource_; }
192 void Init(PP_Resource resource, bool report_error) {
197 // Validate the resource (note, if both are wrong, we will return
199 SetStateForResourceError(resource, resource_, object_, report_error);
213 EnterResourceNoLock(PP_Resource resource, bool report_error)
214 : EnterResource<ResourceT, false>(resource, report_error) {
216 EnterResourceNoLock(PP_Resource resource,
219 : EnterResource<ResourceT, false>(resource, callback, report_error) {