diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-13 04:28:40 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-13 04:28:40 +0000 |
commit | 24cddd42154b07c6559846b2159a88a3feabb5d5 (patch) | |
tree | 96b150cab1ff6de13845f0e36c51735fed34be9e /ppapi/host | |
parent | 56a4bf839077e7dfd8cb178b8d8ad09f5215dead (diff) | |
download | chromium_src-24cddd42154b07c6559846b2159a88a3feabb5d5.zip chromium_src-24cddd42154b07c6559846b2159a88a3feabb5d5.tar.gz chromium_src-24cddd42154b07c6559846b2159a88a3feabb5d5.tar.bz2 |
Add permissions buts for Pepper plugins.
This patch doesn't actually hook anything up, but it plumbs them in for the laces we'll need it.
Review URL: https://chromiumcodereview.appspot.com/10735011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146519 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/host')
-rw-r--r-- | ppapi/host/ppapi_host.cc | 7 | ||||
-rw-r--r-- | ppapi/host/ppapi_host.h | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/ppapi/host/ppapi_host.cc b/ppapi/host/ppapi_host.cc index 038f4e7..8754501 100644 --- a/ppapi/host/ppapi_host.cc +++ b/ppapi/host/ppapi_host.cc @@ -24,9 +24,12 @@ const size_t kMaxResourcesPerPlugin = 1 << 14; } // namespace -PpapiHost::PpapiHost(IPC::Sender* sender, HostFactory* host_factory) +PpapiHost::PpapiHost(IPC::Sender* sender, + HostFactory* host_factory, + const PpapiPermissions& perms) : sender_(sender), - host_factory_(host_factory) { + host_factory_(host_factory), + permissions_(perms) { } PpapiHost::~PpapiHost() { diff --git a/ppapi/host/ppapi_host.h b/ppapi/host/ppapi_host.h index eb195b8..7a20c1f 100644 --- a/ppapi/host/ppapi_host.h +++ b/ppapi/host/ppapi_host.h @@ -14,6 +14,7 @@ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" #include "ppapi/host/ppapi_host_export.h" +#include "ppapi/shared_impl/ppapi_permissions.h" namespace ppapi { @@ -35,9 +36,13 @@ class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener { // 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); + PpapiHost(IPC::Sender* sender, + HostFactory* host_factory, + const PpapiPermissions& perms); virtual ~PpapiHost(); + const PpapiPermissions& permissions() const { return permissions_; } + // Sender implementation. Forwards to the sender_. virtual bool Send(IPC::Message* msg) OVERRIDE; @@ -66,6 +71,8 @@ class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener { // Non-owning pointer. HostFactory* host_factory_; + PpapiPermissions permissions_; + typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap; ResourceMap resources_; |