Chromium Code Reviews| Index: ppapi/proxy/plugin_globals.cc |
| =================================================================== |
| --- ppapi/proxy/plugin_globals.cc (revision 115831) |
| +++ ppapi/proxy/plugin_globals.cc (working copy) |
| @@ -16,6 +16,8 @@ |
| plugin_proxy_delegate_(NULL) { |
| DCHECK(!plugin_globals_); |
| plugin_globals_ = this; |
| + |
| + callback_tracker_ = new CallbackTracker; |
|
viettrungluu
2011/12/29 03:45:27
Why don't you initialize this in the initializer l
|
| } |
| PluginGlobals::~PluginGlobals() { |
| @@ -31,6 +33,13 @@ |
| return &plugin_var_tracker_; |
| } |
| +CallbackTracker* PluginGlobals::GetCallbackTrackerForInstance( |
| + PP_Instance /* instance */) { |
|
viettrungluu
2011/12/29 03:45:27
I thought we weren't in the habit of commenting ou
|
| + // In the plugin process, the callback tracker is always the same, regardless |
| + // of the instance. |
| + return callback_tracker_.get(); |
| +} |
| + |
| FunctionGroupBase* PluginGlobals::GetFunctionAPI(PP_Instance inst, ApiID id) { |
| PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(inst); |
| if (dispatcher) |