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

Unified Diff: content/browser/plugin_process_host.cc

Issue 7617019: Add scroll and gesture message filters for UIPI Flash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 96873)
+++ content/browser/plugin_process_host.cc (working copy)
@@ -45,6 +45,8 @@
#endif
#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
namespace {
@@ -58,6 +60,9 @@
::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
@@ -79,8 +84,11 @@
}
void PluginProcessHost::OnReparentPluginWindow(HWND window, HWND parent) {
- // Reparent only to our process.
+ // Reparent only from the plugin process to our process.
DWORD process_id = 0;
+ ::GetWindowThreadProcessId(window, &process_id);
+ if (process_id != ::GetProcessId(GetChildProcessHandle()))
+ return;
::GetWindowThreadProcessId(parent, &process_id);
if (process_id != ::GetCurrentProcessId())
return;

Powered by Google App Engine
This is Rietveld 408576698