summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 00:43:08 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 00:43:08 +0000
commitfb4663463c33d39b591a159b22e84d3c5d81ea62 (patch)
tree404f931268587d6063601b0a52a75d655cd71904 /chrome/renderer
parentacb7d597819483d8db4b28fdf42b3e9d07182b5b (diff)
downloadchromium_src-fb4663463c33d39b591a159b22e84d3c5d81ea62.zip
chromium_src-fb4663463c33d39b591a159b22e84d3c5d81ea62.tar.gz
chromium_src-fb4663463c33d39b591a159b22e84d3c5d81ea62.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@20693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc5
-rw-r--r--chrome/renderer/render_view.h4
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc4
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(