| Index: webkit/plugins/ppapi/plugin_module.cc
|
| ===================================================================
|
| --- webkit/plugins/ppapi/plugin_module.cc (revision 77663)
|
| +++ webkit/plugins/ppapi/plugin_module.cc (working copy)
|
| @@ -382,7 +382,8 @@
|
| callback_tracker_(new CallbackTracker),
|
| is_crashed_(false),
|
| library_(NULL),
|
| - name_(name) {
|
| + name_(name),
|
| + reserve_instance_id_(NULL) {
|
| pp_module_ = ResourceTracker::Get()->AddModule(this);
|
| GetMainThreadMessageLoop(); // Initialize the main thread message loop.
|
| GetLivePluginSet()->insert(this);
|
| @@ -505,6 +506,18 @@
|
| lifetime_delegate_->PluginModuleDead(this);
|
| }
|
|
|
| +void PluginModule::SetReserveInstanceIDCallback(
|
| + PP_Bool (*reserve)(PP_Module, PP_Instance)) {
|
| + DCHECK(!reserve_instance_id_) << "Only expect one set.";
|
| + reserve_instance_id_ = reserve;
|
| +}
|
| +
|
| +bool PluginModule::ReserveInstanceID(PP_Instance instance) {
|
| + if (reserve_instance_id_)
|
| + return PPBoolToBool(reserve_instance_id_(pp_module_, instance));
|
| + return true; // Instance ID is usable.
|
| +}
|
| +
|
| bool PluginModule::InitializeModule() {
|
| DCHECK(!out_of_process_proxy_.get()) << "Don't call for proxied modules.";
|
| int retval = entry_points_.initialize_module(pp_module(), &GetInterface);
|
|
|