summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/var_serialization_rules.h
Commit message (Collapse)AuthorAgeFilesLines
* Refactor PPAPI proxy resource handling to maintain which host they came from,brettw@chromium.org2011-01-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* First pass at making the proxy handle multiple renderers. This associates thebrettw@chromium.org2011-01-211-8/+15
| | | | | | | | | | | | | | | | | | | | 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
* Var serialization-related proxy stuff. This allows vars to be sent over IPCbrettw@chromium.org2010-11-051-0/+85
| | | | | | | | | | | | | | | | | | | | | | and received with proper refcounting semantics. The basic design is that the SerializedVar is the thing actually handled by IPC. Then you use one of the many helper classes depending on whether you are sending or receiving and what the ownership semantics are. The helper classes, along with the VarSerialization interface makes the right thing happen for string conversion & refcounting. The VarSerialization class is implemented differently on the browser and plugin side and is where the differences in refcounting & strings are handled. This allows the rest of the code to be the same on both the plugin and browser side and allows vars to be sent back and forth. This patch references some files not in it like the dispatcher and various tracker classes. This is the cleanest cut I could make for a reasonably reviewable chunk. Review URL: http://codereview.chromium.org/4096008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65262 0039d316-1c4b-4281-b951-d872f2087c98
* Revert PPAPI proxy change with too many files in it.brettw@chromium.org2010-11-031-85/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64870 0039d316-1c4b-4281-b951-d872f2087c98
* Core PPAPI proxy files. This includes the dispatcher which is the control pointbrettw@chromium.org2010-11-031-0/+85
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