| Index: ppapi/proxy/plugin_dispatcher.h
|
| diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h
|
| index 896689e6a9d88d0bc04313cf003a52c60b6c2de6..39ae340df410666ccdbf7adefbe2592eb5a8e407 100644
|
| --- a/ppapi/proxy/plugin_dispatcher.h
|
| +++ b/ppapi/proxy/plugin_dispatcher.h
|
| @@ -88,7 +88,11 @@ class PPAPI_PROXY_EXPORT PluginDispatcher : public Dispatcher {
|
| // object as a convenience. Returns NULL on failure.
|
| static PluginDispatcher* GetForResource(const Resource* resource);
|
|
|
| - static const void* GetInterfaceFromDispatcher(const char* interface);
|
| + // Implements the GetInterface function for the plugin to call to retrieve
|
| + // a browser interface.
|
| + static const void* GetBrowserInterface(const char* interface);
|
| +
|
| + const void* GetPluginInterface(const std::string& interface_name);
|
|
|
| // You must call this function before anything else. Returns true on success.
|
| // The delegate pointer must outlive this class, ownership is not
|
| @@ -148,14 +152,12 @@ class PPAPI_PROXY_EXPORT PluginDispatcher : public Dispatcher {
|
|
|
| PluginDelegate* plugin_delegate_;
|
|
|
| - // All target proxies currently created. These are ones that receive
|
| - // messages.
|
| - scoped_ptr<InterfaceProxy> target_proxies_[INTERFACE_ID_COUNT];
|
| -
|
| - // Function proxies created for "new-style" FunctionGroups.
|
| - // TODO(brettw) this is in progress. It should be merged with the target
|
| - // proxies so there is one list to consult.
|
| - scoped_ptr<FunctionGroupBase> function_proxies_[INTERFACE_ID_COUNT];
|
| + // Contains all the plugin interfaces we've queried. The mapped value will
|
| + // be the pointer to the interface pointer supplied by the plugin if it's
|
| + // supported, or NULL if it's not supported. This allows us to cache failures
|
| + // and not req-query if a plugin doesn't support the interface.
|
| + typedef base::hash_map<std::string, const void*> InterfaceMap;
|
| + InterfaceMap plugin_interfaces_;
|
|
|
| typedef base::hash_map<PP_Instance, InstanceData> InstanceDataMap;
|
| InstanceDataMap instance_map_;
|
|
|