summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_process_host.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 02:07:18 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 02:07:18 +0000
commit20b64d30cee31ae12e29a520836d25e93a192c6d (patch)
tree81815977aefce88c281c54dfcf750f418d0cb99b /chrome/browser/plugin_process_host.h
parentdf813ac7b79f6c935df34dc82d8d6018d0a3d032 (diff)
downloadchromium_src-20b64d30cee31ae12e29a520836d25e93a192c6d.zip
chromium_src-20b64d30cee31ae12e29a520836d25e93a192c6d.tar.gz
chromium_src-20b64d30cee31ae12e29a520836d25e93a192c6d.tar.bz2
Ensure that we display a sad face for a windowed plugin when the plugin process crashes. This was a regression introduced by creating the plugin parent on the browser UI thread, which remains valid when the plugin process crashes.
The fix is to track plugin wrapper windows in the PluginProcessHost class and destroy any remaining windows in the destructor. Removed the DestroyWindowTask which destroys the windows on the UI thread. We can achieve the same result by posting WM_CLOSE messages to these windows. This fixes http://code.google.com/p/chromium/issues/detail?id=7673 Bug=7673 Review URL: http://codereview.chromium.org/40120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host.h')
-rw-r--r--chrome/browser/plugin_process_host.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index b9a5681..ead8c81 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -7,6 +7,7 @@
#include "build/build_config.h"
+#include <set>
#include <vector>
#include "base/basictypes.h"
@@ -79,6 +80,11 @@ class PluginProcessHost : public ChildProcessHost,
const WebPluginInfo& info() const { return info_; }
+#if defined(OS_WIN)
+ // Tracks plugin parent windows created on the browser UI thread.
+ void AddWindow(HWND window);
+#endif
+
private:
friend class PluginResolveProxyHelper;
@@ -137,6 +143,11 @@ class PluginProcessHost : public ChildProcessHost,
// the requests to the proxy service).
ResolveProxyMsgHelper resolve_proxy_msg_helper_;
+#if defined(OS_WIN)
+ // Tracks plugin parent windows created on the UI thread.
+ std::set<HWND> plugin_parent_windows_set_;
+#endif
+
DISALLOW_EVIL_CONSTRUCTORS(PluginProcessHost);
};