| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
| 11 #include "ppapi/c/pp_module.h" |
| 11 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
| 12 #include "ppapi/proxy/interface_id.h" | 13 #include "ppapi/proxy/interface_id.h" |
| 13 | 14 |
| 14 namespace ppapi { | 15 namespace ppapi { |
| 15 | 16 |
| 16 class FunctionGroupBase; | 17 class FunctionGroupBase; |
| 17 class ResourceTracker; | 18 class ResourceTracker; |
| 18 class VarTracker; | 19 class VarTracker; |
| 19 | 20 |
| 20 // Tracks resource and function APIs, providing a mapping between ID and | 21 // Tracks resource and function APIs, providing a mapping between ID and |
| (...skipping 16 matching lines...) Expand all Loading... |
| 37 // Init() first (it should be unnecessary to NULL-check this). | 38 // Init() first (it should be unnecessary to NULL-check this). |
| 38 static TrackerBase* Get(); | 39 static TrackerBase* Get(); |
| 39 | 40 |
| 40 // Returns the function object corresponding to the given ID, or NULL if | 41 // Returns the function object corresponding to the given ID, or NULL if |
| 41 // there isn't one. | 42 // there isn't one. |
| 42 virtual FunctionGroupBase* GetFunctionAPI(PP_Instance inst, | 43 virtual FunctionGroupBase* GetFunctionAPI(PP_Instance inst, |
| 43 proxy::InterfaceID id) = 0; | 44 proxy::InterfaceID id) = 0; |
| 44 | 45 |
| 45 virtual VarTracker* GetVarTracker() = 0; | 46 virtual VarTracker* GetVarTracker() = 0; |
| 46 virtual ResourceTracker* GetResourceTracker() = 0; | 47 virtual ResourceTracker* GetResourceTracker() = 0; |
| 48 |
| 49 // Returns the PP_Module associated with the given PP_Instance, or 0 on |
| 50 // failure. |
| 51 virtual PP_Module GetModuleForInstance(PP_Instance instance) = 0; |
| 47 }; | 52 }; |
| 48 | 53 |
| 49 } // namespace ppapi | 54 } // namespace ppapi |
| 50 | 55 |
| 51 #endif // PPAPI_SHARED_IMPL_TRACKER_BASE_H_ | 56 #endif // PPAPI_SHARED_IMPL_TRACKER_BASE_H_ |
| OLD | NEW |