diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-27 20:45:59 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-27 20:45:59 +0000 |
commit | 51d70e07bd5d991420bc0f14ff05f1a9b72d02db (patch) | |
tree | 718c0b24680c1b14eb4570403cc15b8d09b4002d /chrome/browser/plugin_process_host.h | |
parent | 70ac249f04337f0040ad63a72ced111d87fdc73a (diff) | |
download | chromium_src-51d70e07bd5d991420bc0f14ff05f1a9b72d02db.zip chromium_src-51d70e07bd5d991420bc0f14ff05f1a9b72d02db.tar.gz chromium_src-51d70e07bd5d991420bc0f14ff05f1a9b72d02db.tar.bz2 |
Refactor plugin process code which checks with the browser process before shutdown, to avoid races in which the browser process thinks the process is fine to use while it's shutting down. I also removed PluginProcess/WorkerProcess since they didn't have any code in them now.
I removed the plugin process code which waits 10 seconds before shutting itself down. That was a premature optimization, since testing with/without this didn't show any difference (see http://www/~jabdelmalek/chrome/test/plugins/processes.html). In both cases, the plugin on a page would get recreated in less than 100ms, even with reusing or starting a plugin process from scratch. We already spawn new renderer processes on back and forth if it's a different origin, and the plugin will be in the cache anyways.
Review URL: http://codereview.chromium.org/53091
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12703 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host.h')
-rw-r--r-- | chrome/browser/plugin_process_host.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h index bc15ca2..71b7c77 100644 --- a/chrome/browser/plugin_process_host.h +++ b/chrome/browser/plugin_process_host.h @@ -75,9 +75,6 @@ class PluginProcessHost : public ChildProcessHost, void OnModalDialogResponse(const std::string& json_retval, IPC::Message* sync_result); - // Shuts down the current plugin process instance. - void Shutdown(); - const WebPluginInfo& info() const { return info_; } #if defined(OS_WIN) @@ -106,7 +103,6 @@ class PluginProcessHost : public ChildProcessHost, void OnGetCookies(uint32 request_context, const GURL& url, std::string* cookies); void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); - void OnPluginShutdownRequest(); void OnPluginMessage(const std::vector<uint8>& data); #if defined(OS_WIN) @@ -114,6 +110,8 @@ class PluginProcessHost : public ChildProcessHost, void OnDestroyWindow(HWND window); #endif + virtual bool CanShutdown() { return sent_requests_.empty(); } + struct ChannelRequest { ChannelRequest(ResourceMessageFilter* renderer_message_filter, const std::string& m, IPC::Message* r) : |