diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-14 22:31:32 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-14 22:31:32 +0000 |
commit | d6f2af9030eaac77695a97f4d3cb643ccacc3a78 (patch) | |
tree | 04684a311b407a0a1026dbd9199d19378bd1091a /chrome/renderer | |
parent | a80331bf8b8353b4335f3a751a7856833ea28a18 (diff) | |
download | chromium_src-d6f2af9030eaac77695a97f4d3cb643ccacc3a78.zip chromium_src-d6f2af9030eaac77695a97f4d3cb643ccacc3a78.tar.gz chromium_src-d6f2af9030eaac77695a97f4d3cb643ccacc3a78.tar.bz2 |
linux: destroy browser-side plugin windows on plugin crash
Because the plugin windows must be destroyed by the UI thread,
we store the map of plugin PID -> plugin windows there,
on the RenderWidgetHostView.
This differs slightly from Windows, where the map is stored
on the PluginProcessHost, but is otherwise pretty similar.
TEST=crash a windowed plugin; you should see a sad plugin
icon in the place of the plugin
Review URL: http://codereview.chromium.org/155517
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20683 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_view.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 4 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.cc | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 436de6e..15d7771 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -255,8 +255,9 @@ void RenderView::PluginDestroyed(WebPluginDelegateProxy* proxy) { first_default_plugin_ = NULL; } -void RenderView::PluginCrashed(const FilePath& plugin_path) { - Send(new ViewHostMsg_CrashedPlugin(routing_id_, plugin_path)); +void RenderView::PluginCrashed(base::ProcessId pid, + const FilePath& plugin_path) { + Send(new ViewHostMsg_CrashedPlugin(routing_id_, pid, plugin_path)); } diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index ba6374d..0b1a38a 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -325,8 +325,8 @@ class RenderView : public RenderWidget, // Called when a plugin is destroyed. void PluginDestroyed(WebPluginDelegateProxy* proxy); - // Called when a plugin is crashed. - void PluginCrashed(const FilePath& plugin_path); + // Called when a plugin has crashed. + void PluginCrashed(base::ProcessId pid, const FilePath& plugin_path); // Called from JavaScript window.external.AddSearchProvider() to add a // keyword for a provider described in the given OpenSearch document. diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index c723097..a5423ac 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -386,7 +386,7 @@ void WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) { void WebPluginDelegateProxy::OnChannelError() { if (plugin_) plugin_->Invalidate(); - render_view_->PluginCrashed(plugin_path_); + render_view_->PluginCrashed(GetProcessId(), plugin_path_); } void WebPluginDelegateProxy::UpdateGeometry( @@ -709,7 +709,7 @@ void WebPluginDelegateProxy::OnSetWindow(gfx::PluginWindowHandle window) { void WebPluginDelegateProxy::OnCreatePluginContainer( gfx::PluginWindowHandle* container) { RenderThread::current()->Send(new ViewHostMsg_CreatePluginContainer( - render_view_->routing_id(), container)); + render_view_->routing_id(), GetProcessId(), container)); } void WebPluginDelegateProxy::OnDestroyPluginContainer( |