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

Unified Diff: content/browser/plugin_process_host.cc

Issue 11049004: Remove Legacy NPAPI Flash Sandbox support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
Index: content/browser/plugin_process_host.cc
===================================================================
--- content/browser/plugin_process_host.cc (revision 160170)
+++ content/browser/plugin_process_host.cc (working copy)
@@ -58,24 +58,6 @@
#include "webkit/plugins/npapi/plugin_constants_win.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
-namespace {
-
-void ReparentPluginWindowHelper(HWND window, HWND parent) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- int window_style = WS_CHILD;
- if (!webkit::npapi::WebPluginDelegateImpl::IsDummyActivationWindow(window))
- window_style |= WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
-
- ::SetWindowLongPtr(window, GWL_STYLE, window_style);
- ::SetParent(window, parent);
- // Allow the Flash plugin to forward some messages back to Chrome.
- if (base::win::GetVersion() >= base::win::VERSION_WIN7)
- ::SetPropW(parent, webkit::npapi::kNativeWindowClassFilterProp, HANDLE(-1));
-}
-
-} // namespace
-
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.
@@ -92,25 +74,6 @@
plugin_parent_windows_set_.insert(window);
}
-void PluginProcessHost::OnReparentPluginWindow(HWND window, HWND parent) {
- // Reparent only from the plugin process to our process.
- DWORD process_id = 0;
- ::GetWindowThreadProcessId(window, &process_id);
- if (process_id != ::GetProcessId(process_->GetHandle()))
- return;
- ::GetWindowThreadProcessId(parent, &process_id);
- if (process_id != ::GetCurrentProcessId())
- return;
-
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- base::Bind(ReparentPluginWindowHelper, window, parent));
-}
-
-void PluginProcessHost::OnReportExecutableMemory(size_t size) {
- // TODO(jschuh): move this into the plugin process once it supports UMA.
- UMA_HISTOGRAM_MEMORY_KB("Plugin.ExecPageSizeKB", size / 1024);
-}
#endif // defined(OS_WIN)
#if defined(TOOLKIT_GTK)
@@ -317,10 +280,6 @@
#if defined(OS_WIN)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginWindowDestroyed,
OnPluginWindowDestroyed)
- IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ReparentPluginWindow,
- OnReparentPluginWindow)
- IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ReportExecutableMemory,
- OnReportExecutableMemory)
#endif
#if defined(TOOLKIT_GTK)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_MapNativeViewId,
« no previous file with comments | « content/browser/plugin_process_host.h ('k') | content/browser/renderer_host/render_widget_host_view_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698