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 /content/common/child_process.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 'content/common/child_process.h')
-rw-r--r-- | content/common/child_process.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/content/common/child_process.h b/content/common/child_process.h index 518314d..d7e9a00 100644 --- a/content/common/child_process.h +++ b/content/common/child_process.h @@ -18,11 +18,15 @@ class ChildThread; class ChildProcess { public: // Child processes should have an object that derives from this class. + // Normally you would immediately call set_main_thread after construction. ChildProcess(); virtual ~ChildProcess(); - // Getter for the child process' main thread. + // May be NULL if the main thread hasn't been set explicitly. ChildThread* main_thread(); + + // Sets the object associated with the main thread of this process. + // Takes ownership of the pointer. void set_main_thread(ChildThread* thread); MessageLoop* io_message_loop() { return io_thread_.message_loop(); } |