Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1276)

Unified Diff: content/browser/plugin_process_host.cc

Issue 1815593002: Remove windowed NPAPI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make_test_plugin_windowless
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/plugin_process_host.h ('k') | content/browser/plugin_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_process_host.cc
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc
index cb14fa7b669940ec814a48538e391b7be4a36064..de7c93433b3f8e312319b585e0dfae53eb8b4cd1 100644
--- a/content/browser/plugin_process_host.cc
+++ b/content/browser/plugin_process_host.cc
@@ -79,24 +79,6 @@ bool PluginProcessHost::GetWebPluginInfoFromPluginPid(base::ProcessId pid,
return true;
}
-#if defined(OS_WIN)
-void PluginProcessHost::OnPluginWindowDestroyed(HWND window, HWND parent) {
- // The window is destroyed at this point, we just care about its parent, which
- // is the intermediate window we created.
- std::set<HWND>::iterator window_index =
- plugin_parent_windows_set_.find(parent);
- if (window_index == plugin_parent_windows_set_.end())
- return;
-
- plugin_parent_windows_set_.erase(window_index);
- PostMessage(parent, WM_CLOSE, 0, 0);
-}
-
-void PluginProcessHost::AddWindow(HWND window) {
- plugin_parent_windows_set_.insert(window);
-}
-#endif // defined(OS_WIN)
-
// NOTE: changes to this class need to be reviewed by the security team.
class PluginSandboxedProcessLauncherDelegate
: public SandboxedProcessLauncherDelegate {
@@ -136,20 +118,7 @@ PluginProcessHost::PluginProcessHost()
}
PluginProcessHost::~PluginProcessHost() {
-#if defined(OS_WIN)
- // We erase HWNDs from the plugin_parent_windows_set_ when we receive a
- // notification that the window is being destroyed. If we don't receive this
- // notification and the PluginProcessHost instance is being destroyed, it
- // means that the plugin process crashed. We paint a sad face in this case in
- // the renderer process. To ensure that the sad face shows up, and we don't
- // leak HWNDs, we should destroy existing plugin parent windows.
- std::set<HWND>::iterator window_index;
- for (window_index = plugin_parent_windows_set_.begin();
- window_index != plugin_parent_windows_set_.end();
- ++window_index) {
- PostMessage(*window_index, WM_CLOSE, 0, 0);
- }
-#elif defined(OS_MACOSX)
+#if defined(OS_MACOSX)
DCHECK_CURRENTLY_ON(BrowserThread::IO);
// If the plugin process crashed but had fullscreen windows open at the time,
// make sure that the menu bar is visible.
@@ -289,10 +258,6 @@ bool PluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ChannelCreated, OnChannelCreated)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ChannelDestroyed,
OnChannelDestroyed)
-#if defined(OS_WIN)
- IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginWindowDestroyed,
- OnPluginWindowDestroyed)
-#endif
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginShowWindow,
OnPluginShowWindow)
« no previous file with comments | « content/browser/plugin_process_host.h ('k') | content/browser/plugin_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698