Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: ppapi/host/ppapi_host.h

Issue 10803050: Hook up the PPB_Flash_Print interface to new host system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with deps Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/host/instance_message_filter.cc ('k') | ppapi/host/ppapi_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/host/ppapi_host.h
diff --git a/ppapi/host/ppapi_host.h b/ppapi/host/ppapi_host.h
index 7a20c1fe286dee65fba2cc0cb80a00a1a84269a4..5bc284cdbe22c4b377441b003292cbd43fdb35b2 100644
--- a/ppapi/host/ppapi_host.h
+++ b/ppapi/host/ppapi_host.h
@@ -9,6 +9,9 @@
#include "base/compiler_specific.h"
#include "base/memory/linked_ptr.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/observer_list.h"
+#include "base/memory/scoped_vector.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
#include "ppapi/c/pp_instance.h"
@@ -26,6 +29,7 @@ class ResourceMessageReplyParams;
namespace host {
class HostFactory;
+class InstanceMessageFilter;
class ResourceHost;
// The host provides routing and tracking for resource message calls that
@@ -53,7 +57,13 @@ class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener {
void SendReply(const proxy::ResourceMessageReplyParams& params,
const IPC::Message& msg);
+ // Adds the given message filter to the host. The PpapiHost will take
+ // ownership of the pointer.
+ void AddInstanceMessageFilter(scoped_ptr<InstanceMessageFilter> filter);
+
private:
+ friend class InstanceMessageFilter;
+
// Message handlers.
void OnHostMsgResourceCall(const proxy::ResourceMessageCallParams& params,
const IPC::Message& nested_msg);
@@ -73,6 +83,12 @@ class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener {
PpapiPermissions permissions_;
+ // Filters for instance messages. Note that since we don't support deleting
+ // these dynamically we don't need to worry about modifications during
+ // iteration. If we add that capability, this should be replaced with an
+ // ObserverList.
+ ScopedVector<InstanceMessageFilter> instance_message_filters_;
+
typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap;
ResourceMap resources_;
« no previous file with comments | « ppapi/host/instance_message_filter.cc ('k') | ppapi/host/ppapi_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698