| Index: ppapi/host/ppapi_host.h
|
| diff --git a/ppapi/host/ppapi_host.h b/ppapi/host/ppapi_host.h
|
| index 7a20c1fe286dee65fba2cc0cb80a00a1a84269a4..306472447cd3d4a309b9851c5b6e7761b85d8929 100644
|
| --- a/ppapi/host/ppapi_host.h
|
| +++ b/ppapi/host/ppapi_host.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/linked_ptr.h"
|
| +#include "base/observer_list.h"
|
| #include "ipc/ipc_listener.h"
|
| #include "ipc/ipc_sender.h"
|
| #include "ppapi/c/pp_instance.h"
|
| @@ -26,6 +27,7 @@ class ResourceMessageReplyParams;
|
| namespace host {
|
|
|
| class HostFactory;
|
| +class InstanceMessageFilter;
|
| class ResourceHost;
|
|
|
| // The host provides routing and tracking for resource message calls that
|
| @@ -33,8 +35,8 @@ class ResourceHost;
|
| // corresponding replies.
|
| class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener {
|
| public:
|
| - // The sender is the channel to the plugin for outgoing messages. The factory
|
| - // will be used to receive resource creation messages from the plugin. Both
|
| + // The sender is the channel to the plugin for outgoing messages. The factory
|
| + // will be used to receive resource creation messages from the plugin. Both
|
| // pointers are owned by the caller and must outlive this class.
|
| PpapiHost(IPC::Sender* sender,
|
| HostFactory* host_factory,
|
| @@ -54,6 +56,11 @@ class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener {
|
| const IPC::Message& msg);
|
|
|
| private:
|
| + friend class InstanceMessageFilter;
|
| +
|
| + void AddInstanceMessageFilter(InstanceMessageFilter* filter);
|
| + void RemoveInstanceMessageFilter(InstanceMessageFilter* filter);
|
| +
|
| // Message handlers.
|
| void OnHostMsgResourceCall(const proxy::ResourceMessageCallParams& params,
|
| const IPC::Message& nested_msg);
|
| @@ -73,6 +80,9 @@ class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener {
|
|
|
| PpapiPermissions permissions_;
|
|
|
| + // Filters for instance messages. Non-owning pointers.
|
| + ObserverList<InstanceMessageFilter> instance_message_filters_;
|
| +
|
| typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap;
|
| ResourceMap resources_;
|
|
|
|
|