0
Commit Graph

7 Commits

Author SHA1 Message Date
brettw@chromium.org
f24448db9f Refactor PPAPI proxy resource handling to maintain which host they came from,
and to map back to that host when calling functions on them. Adds a mapping
between resources generated by the hosts to a new list inside the plugin so
there can't be overlaps.

This means there are now two meanings for a PP_Resource, one in the plugin
process and one in the host process. This is potentially very confusing. I
introduced a new object called a HostResource that always represents a
"host" PP_Resource to try to prevent errors. In the plugin side of the proxy,
it only deals with PP_Resources valid in the plugin, and SerializedResources
valid in the host. It also encapsulates the associated instance, which
simplifies some code.

Each PluginResource object maintains its SerializedResource which the proxy
uses to send to the host for requests. This requires getting the PluginResource
object in more proxy calls.

This fixes a bug in var sending introduced in my previous patch. The var
releasing from EndSendPassRef used the host var rather than the plugin var. I
had to add more plumbing to get the dispatcher at this location and convert
to a plugin var.

I removed the separate file for ImageData and put it in ppb_image_data_proxy
like for the other resource types.

TEST=some unit tests included
BUG=none
Review URL: http://codereview.chromium.org/6334016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72879 0039d316-1c4b-4281-b951-d872f2087c98
2011-01-27 20:40:39 +00:00
brettw@chromium.org
4614f19748 First pass at making the proxy handle multiple renderers. This associates the
instance with resources and has most callers retrieve the dispatcher
according to the appropriate instance. This isn't hooked up to anything yet.

This changes some PPB_Flash interface methods to use PP_Bool.

The most challenging part of the change is in the plugin_var_tracker which
now needs to track which dispatcher each var object came from, and remap var
IDs since each renderer will be generating var IDs in its own space, which
will likely overlap. A similar system will need to be done for resources
which is not implemented yet.

I added some null checks in audio_impl because audio_ can be NULL in some
cases when using the trusted API. I discovered this when testing NaCl for
this patch.
Review URL: http://codereview.chromium.org/6282007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72053 0039d316-1c4b-4281-b951-d872f2087c98
2011-01-21 00:26:43 +00:00
erg@google.com
ddb1e5ae09 Even more virtual method deinlining.
BUG=none
TEST=compiles

Review URL: http://codereview.chromium.org/5741001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69041 0039d316-1c4b-4281-b951-d872f2087c98
2010-12-13 20:10:45 +00:00
erg@google.com
7cf4091e5e Start deinlining non-empty virtual methods. (This will be automatically checked
for in the future.)

BUG=none
TEST=compiles

Review URL: http://codereview.chromium.org/5574006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68746 0039d316-1c4b-4281-b951-d872f2087c98
2010-12-09 18:25:03 +00:00
brettw@chromium.org
c2932f5e21 Core PPAPI proxy files. This includes the dispatcher which is the control point
on each end of the IPC channel. It includes the IPC message definitions. It
also includes the base class for the interface proxying, and the core resource
and var tracking.

BUG=none
TEST=none
Review=http://codereview.chromium.org/4229002/show

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64874 0039d316-1c4b-4281-b951-d872f2087c98
2010-11-03 03:22:33 +00:00
brettw@chromium.org
1a4d9cb51c Revert PPAPI proxy change with too many files in it.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64870 0039d316-1c4b-4281-b951-d872f2087c98
2010-11-03 03:13:01 +00:00
brettw@chromium.org
4bcab1c571 Core PPAPI proxy files. This includes the dispatcher which is the control point
on each end of the IPC channel. It includes the IPC message definitions. It
also includes the base class for the interface proxying, and the core resource
and var tracking.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/4229002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64869 0039d316-1c4b-4281-b951-d872f2087c98
2010-11-03 03:10:13 +00:00