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 WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 static ResourceTracker* Get(); | 49 static ResourceTracker* Get(); |
50 | 50 |
51 // PP_Resources -------------------------------------------------------------- | 51 // PP_Resources -------------------------------------------------------------- |
52 | 52 |
53 // TrackerBase. | 53 // TrackerBase. |
54 virtual ::ppapi::FunctionGroupBase* GetFunctionAPI( | 54 virtual ::ppapi::FunctionGroupBase* GetFunctionAPI( |
55 PP_Instance pp_instance, | 55 PP_Instance pp_instance, |
56 ::ppapi::proxy::InterfaceID id) OVERRIDE; | 56 ::ppapi::proxy::InterfaceID id) OVERRIDE; |
57 virtual ::ppapi::VarTracker* GetVarTracker() OVERRIDE; | 57 virtual ::ppapi::VarTracker* GetVarTracker() OVERRIDE; |
58 virtual ::ppapi::ResourceTracker* GetResourceTracker() OVERRIDE; | 58 virtual ::ppapi::ResourceTracker* GetResourceTracker() OVERRIDE; |
| 59 virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE; |
59 | 60 |
60 // PP_Vars ------------------------------------------------------------------- | 61 // PP_Vars ------------------------------------------------------------------- |
61 | 62 |
62 // Tracks all live NPObjectVar. This is so we can map between instance + | 63 // Tracks all live NPObjectVar. This is so we can map between instance + |
63 // NPObject and get the NPObjectVar corresponding to it. This Add/Remove | 64 // NPObject and get the NPObjectVar corresponding to it. This Add/Remove |
64 // function is called by the NPObjectVar when it is created and | 65 // function is called by the NPObjectVar when it is created and |
65 // destroyed. | 66 // destroyed. |
66 void AddNPObjectVar(::ppapi::NPObjectVar* object_var); | 67 void AddNPObjectVar(::ppapi::NPObjectVar* object_var); |
67 void RemoveNPObjectVar(::ppapi::NPObjectVar* object_var); | 68 void RemoveNPObjectVar(::ppapi::NPObjectVar* object_var); |
68 | 69 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 typedef std::map<PP_Module, PluginModule*> ModuleMap; | 170 typedef std::map<PP_Module, PluginModule*> ModuleMap; |
170 ModuleMap module_map_; | 171 ModuleMap module_map_; |
171 | 172 |
172 DISALLOW_COPY_AND_ASSIGN(ResourceTracker); | 173 DISALLOW_COPY_AND_ASSIGN(ResourceTracker); |
173 }; | 174 }; |
174 | 175 |
175 } // namespace ppapi | 176 } // namespace ppapi |
176 } // namespace webkit | 177 } // namespace webkit |
177 | 178 |
178 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ | 179 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_ |
OLD | NEW |