OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_SHARED_IMPL_TRACKER_BASE_H_ | 5 #ifndef PPAPI_SHARED_IMPL_TRACKER_BASE_H_ |
6 #define PPAPI_SHARED_IMPL_TRACKER_BASE_H_ | 6 #define PPAPI_SHARED_IMPL_TRACKER_BASE_H_ |
7 | 7 |
8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
9 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
10 #include "ppapi/proxy/interface_id.h" | 10 #include "ppapi/proxy/interface_id.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 static TrackerBase* Get(); | 33 static TrackerBase* Get(); |
34 | 34 |
35 // Returns the resource object corresponding to the given ID, or NULL if | 35 // Returns the resource object corresponding to the given ID, or NULL if |
36 // there isn't one. | 36 // there isn't one. |
37 virtual ResourceObjectBase* GetResourceAPI(PP_Resource res) = 0; | 37 virtual ResourceObjectBase* GetResourceAPI(PP_Resource res) = 0; |
38 | 38 |
39 // Returns the function object corresponding to the given ID, or NULL if | 39 // Returns the function object corresponding to the given ID, or NULL if |
40 // there isn't one. | 40 // there isn't one. |
41 virtual FunctionGroupBase* GetFunctionAPI(PP_Instance inst, | 41 virtual FunctionGroupBase* GetFunctionAPI(PP_Instance inst, |
42 pp::proxy::InterfaceID id) = 0; | 42 pp::proxy::InterfaceID id) = 0; |
43 | |
44 // Returns the instance corresponding to the given resource, or 0 if the | |
45 // resource is invalid. | |
46 virtual PP_Instance GetInstanceForResource(PP_Resource resource) = 0; | |
47 }; | 43 }; |
48 | 44 |
49 } // namespace ppapi | 45 } // namespace ppapi |
50 | 46 |
51 #endif // PPAPI_SHARED_IMPL_TRACKER_BASE_H_ | 47 #endif // PPAPI_SHARED_IMPL_TRACKER_BASE_H_ |
OLD | NEW |