From 661f8c4e2a4def96d0c1964a92c9a73e8f4b60bc Mon Sep 17 00:00:00 2001 From: "willchan@chromium.org" Date: Mon, 12 Sep 2011 19:04:04 +0000 Subject: Cancel plugin channel requests when the renderer goes away. Logic: - Profile shutdown kills all renderer processes - When the RMF detects the channel closing, it kills off any plugin channel requests from: * PluginService (which needs to check the PluginServiceFilter on the FILE thread) * PluginProcessHost (which may need to wait for the channel to get established) - RMF uses the new OnPluginProcessHostFound() to cancel at the PluginService or PluginProcessHost BUG=94704 TEST=New PluginService test, no known manual test Review URL: http://codereview.chromium.org/7867031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100733 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/plugin_process_host.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'content/browser/plugin_process_host.h') diff --git a/content/browser/plugin_process_host.h b/content/browser/plugin_process_host.h index fcec36c..202c9a9 100644 --- a/content/browser/plugin_process_host.h +++ b/content/browser/plugin_process_host.h @@ -52,6 +52,7 @@ class PluginProcessHost : public BrowserChildProcessHost { virtual const content::ResourceContext& GetResourceContext() = 0; virtual bool OffTheRecord() = 0; virtual void SetPluginInfo(const webkit::WebPluginInfo& info) = 0; + virtual void OnFoundPluginProcessHost(PluginProcessHost* host) = 0; // The client should delete itself when one of these methods is called. virtual void OnChannelOpened(const IPC::ChannelHandle& handle) = 0; virtual void OnError() = 0; @@ -83,6 +84,9 @@ class PluginProcessHost : public BrowserChildProcessHost { static void CancelPendingRequestsForResourceContext( const content::ResourceContext* context); + // This function is called to cancel requests to open new channels. + void CancelRequest(Client* client); + // This function is called on the IO thread once we receive a reply from the // modal HTML dialog (in the form of a JSON string). This function forwards // that reply back to the plugin that requested the dialog. -- cgit v1.1