summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/host_dispatcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/proxy/host_dispatcher.h')
-rw-r--r--ppapi/proxy/host_dispatcher.h37
1 files changed, 9 insertions, 28 deletions
diff --git a/ppapi/proxy/host_dispatcher.h b/ppapi/proxy/host_dispatcher.h
index 623aa26..10fca5c 100644
--- a/ppapi/proxy/host_dispatcher.h
+++ b/ppapi/proxy/host_dispatcher.h
@@ -32,7 +32,6 @@ struct Preferences;
namespace proxy {
-class InterfaceProxy;
class VarSerialization;
class PPAPI_PROXY_EXPORT HostDispatcher : public Dispatcher {
@@ -80,18 +79,11 @@ class PPAPI_PROXY_EXPORT HostDispatcher : public Dispatcher {
// 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);
-
- // 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);
+ const void* GetProxiedInterface(const std::string& iface_name);
// 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,28 +91,17 @@ class PPAPI_PROXY_EXPORT HostDispatcher : public Dispatcher {
// Returns the proxy interface for talking to the implementation.
const PPB_Proxy_Private* ppb_proxy() const { return ppb_proxy_; }
- private:
- friend class HostDispatcherTest;
-
- // 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);
+ protected:
+ // Overridden from Dispatcher.
+ virtual void OnInvalidMessageReceived();
+ 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_;
-
- // 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];
+ typedef base::hash_map<std::string, bool> PluginSupportedMap;
+ PluginSupportedMap plugin_supported_;
// Guaranteed non-NULL.
const PPB_Proxy_Private* ppb_proxy_;