Index: ppapi/proxy/host_dispatcher.h |
=================================================================== |
--- ppapi/proxy/host_dispatcher.h (revision 100758) |
+++ ppapi/proxy/host_dispatcher.h (working copy) |
@@ -32,7 +32,6 @@ |
namespace proxy { |
-class InterfaceProxy; |
class VarSerialization; |
class PPAPI_PROXY_EXPORT HostDispatcher : public Dispatcher { |
@@ -80,18 +79,11 @@ |
// if the plugin supports the given interface (with caching) and returns the |
// pointer to the proxied interface if it is supported. Returns NULL if the |
// given interface isn't supported by the plugin or the proxy. |
- const void* GetProxiedInterface(const std::string& proxied_interface); |
+ const void* GetProxiedInterface(const std::string& iface_name); |
- // Returns the proxy object associated with the given interface ID, creating |
- // it if necessary. This is used in cases where a proxy needs to access code |
- // in the proxy for another interface. It's assumed that the interface always |
- // exists, so this is only used for browser proxies. |
- // |
- // Will return NULL if an interface isn't supported. |
- InterfaceProxy* GetOrCreatePPBInterfaceProxy(InterfaceID id); |
- |
// See the value below. Call this when processing a scripting message from |
- // the plugin that can be reentered. |
+ // the plugin that can be reentered. This is set to false at the beginning |
+ // of processing of each message from the plugin. |
void set_allow_plugin_reentrancy() { |
allow_plugin_reentrancy_ = true; |
} |
@@ -99,29 +91,18 @@ |
// Returns the proxy interface for talking to the implementation. |
const PPB_Proxy_Private* ppb_proxy() const { return ppb_proxy_; } |
- private: |
- friend class HostDispatcherTest; |
+ protected: |
+ // Overridden from Dispatcher. |
+ virtual void OnInvalidMessageReceived(); |
- // Makes an instance of the given PPB interface proxy, storing it in the |
- // target_proxies_ array. An proxy for this interface must not exist yet. |
- InterfaceProxy* CreatePPBInterfaceProxy(const InterfaceProxy::Info* info); |
- |
+ private: |
PP_Module pp_module_; |
- typedef std::map<std::string, bool> PluginIFSupportedMap; |
// Maps interface name to whether that interface is supported. If an interface |
// name is not in the map, that implies that we haven't queried for it yet. |
- std::map<std::string, bool> plugin_if_supported_; |
+ typedef base::hash_map<std::string, bool> PluginSupportedMap; |
+ PluginSupportedMap plugin_supported_; |
- // All target proxies currently created. These are ones that receive |
- // messages. They are created on demand when we 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]; |
- |
// Guaranteed non-NULL. |
const PPB_Proxy_Private* ppb_proxy_; |