diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-10 21:16:34 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-10 21:16:34 +0000 |
commit | 2cc0622486b85be1e098ecd2af563c0fa9743b26 (patch) | |
tree | eb32a99ee1dddb5699ee5208bd2b153501020fb3 /ppapi/proxy/host_dispatcher.h | |
parent | 82388663bfbeb4dc2fc58e86f83505e67b483d31 (diff) | |
download | chromium_src-2cc0622486b85be1e098ecd2af563c0fa9743b26.zip chromium_src-2cc0622486b85be1e098ecd2af563c0fa9743b26.tar.gz chromium_src-2cc0622486b85be1e098ecd2af563c0fa9743b26.tar.bz2 |
Ensure that PP_Instance values are unique within a plugin process in addition
to within the renderer.
This works by having the renderer check with the plugin that a PP_Instance is
available before using it. If it's already seen, the renderer will generate a
new PP_Instance and retry.
For performance, this message is handled on the I/O thread of the plugin so it
will not be blocked by the actual plugin code.
This requires an unfortunate amount of plumbing. Since the renderer can't
depend directly on the proxy, we have a new PPB_Proxy function to set the
verification function used to perform this check.
There is also a new plugin dispatcher delegate where I moved some of the global
state to that used to go into the init function. Adding yet another parameter
there seemed unfortunate.
TEST=manual
BUG=74961
Review URL: http://codereview.chromium.org/6628019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/host_dispatcher.h')
-rw-r--r-- | ppapi/proxy/host_dispatcher.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ppapi/proxy/host_dispatcher.h b/ppapi/proxy/host_dispatcher.h index 35cdece..0fed9bd 100644 --- a/ppapi/proxy/host_dispatcher.h +++ b/ppapi/proxy/host_dispatcher.h @@ -79,7 +79,7 @@ class HostDispatcher : public Dispatcher { InterfaceProxy* GetOrCreatePPBInterfaceProxy(InterfaceID id); // Returns the proxy interface for talking to the implementation. - const PPB_Proxy_Private* GetPPBProxy(); + const PPB_Proxy_Private* ppb_proxy() const { return ppb_proxy_; } private: friend class HostDispatcherTest; @@ -101,7 +101,7 @@ class HostDispatcher : public Dispatcher { // messages. They are created on demand when we receive messages. scoped_ptr<InterfaceProxy> target_proxies_[INTERFACE_ID_COUNT]; - // Lazily initialized, may be NULL. Use GetPPBProxy(). + // Guaranteed non-NULL. const PPB_Proxy_Private* ppb_proxy_; DISALLOW_COPY_AND_ASSIGN(HostDispatcher); |