diff options
-rw-r--r-- | build/common.gypi | 4 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_win.cc | 23 | ||||
-rw-r--r-- | chrome/common/chrome_content_client.cc | 13 | ||||
-rw-r--r-- | content/browser/plugin_process_host.cc | 10 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_constants_win.cc | 3 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_constants_win.h | 5 |
6 files changed, 6 insertions, 52 deletions
diff --git a/build/common.gypi b/build/common.gypi index 87c0a22..a79a8a0 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1749,8 +1749,8 @@ ['OS=="win"', { 'target_defaults': { 'defines': [ - '_WIN32_WINNT=0x0601', - 'WINVER=0x0601', + '_WIN32_WINNT=0x0600', + 'WINVER=0x0600', 'WIN32', '_WINDOWS', 'NOMINMAX', diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index 568c8fd..986bbb9 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -446,33 +446,12 @@ HWND RenderWidgetHostViewWin::ReparentWindow(HWND window) { } DCHECK(window_class); - HWND orig_parent = ::GetParent(window); HWND parent = CreateWindowEx( WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR, MAKEINTATOM(window_class), 0, WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, - 0, 0, 0, 0, orig_parent, 0, GetModuleHandle(NULL), 0); + 0, 0, 0, 0, ::GetParent(window), 0, GetModuleHandle(NULL), 0); ui::CheckWindowCreated(parent); - // If UIPI is enabled we need to add message filters for parents with - // children that cross process boundaries. - if (::GetPropW(orig_parent, webkit::npapi::kNativeWindowClassFilterProp)) { - // Process-wide message filters required on Vista must be added to: - // chrome_content_client.cc ChromeContentClient::SandboxPlugin - typedef BOOL (WINAPI *ChangeWindowMessageFilterExFunction)( - HWND hwnd, - UINT message, - DWORD action, - PCHANGEFILTERSTRUCT change_filter_struct); - static ChangeWindowMessageFilterExFunction s_ChangeWindowMessageFilterEx = - reinterpret_cast<ChangeWindowMessageFilterExFunction>( - ::GetProcAddress(::GetModuleHandle(L"user32.dll"), - "ChangeWindowMessageFilterEx")); - // Process-wide message filters required on Vista must be added to: - // chrome_content_client.cc ChromeContentClient::SandboxPlugin - s_ChangeWindowMessageFilterEx(parent, WM_MOUSEWHEEL, MSGFLT_ALLOW, NULL); - s_ChangeWindowMessageFilterEx(parent, WM_GESTURE, MSGFLT_ALLOW, NULL); - ::SetPropW(orig_parent, webkit::npapi::kNativeWindowClassFilterProp, NULL); - } ::SetParent(window, parent); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc index 1069918..1adc397 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc @@ -362,19 +362,6 @@ bool ChromeContentClient::SandboxPlugin(CommandLine* command_line, policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0); policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS, sandbox::USER_INTERACTIVE); - // Allow the Flash plugin to forward some messages back to Chrome. - if (base::win::GetVersion() == base::win::VERSION_VISTA) { - typedef BOOL (WINAPI *ChangeWindowMessageFilterFunction)( - UINT message, - DWORD flag); - static ChangeWindowMessageFilterFunction s_ChangeWindowMessageFilter = - reinterpret_cast<ChangeWindowMessageFilterFunction>( - ::GetProcAddress(::GetModuleHandle(L"user32.dll"), - "ChangeWindowMessageFilter")); - // Per-window message filters required on Win7 or later must be added to: - // render_widget_host_view_win.cc RenderWidgetHostViewWin::ReparentWindow - s_ChangeWindowMessageFilter(WM_MOUSEWHEEL, MSGFLT_ADD); - } policy->SetIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW); } else { // Could not start the broker, use a very weak policy instead. diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc index 18d4493..863133f 100644 --- a/content/browser/plugin_process_host.cc +++ b/content/browser/plugin_process_host.cc @@ -44,8 +44,6 @@ #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 { @@ -59,9 +57,6 @@ void ReparentPluginWindowHelper(HWND window, HWND parent) { ::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 @@ -83,11 +78,8 @@ void PluginProcessHost::AddWindow(HWND window) { } void PluginProcessHost::OnReparentPluginWindow(HWND window, HWND parent) { - // Reparent only from the plugin process to our process. + // Reparent only 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; diff --git a/webkit/plugins/npapi/plugin_constants_win.cc b/webkit/plugins/npapi/plugin_constants_win.cc index a62d9bb..44debe4 100644 --- a/webkit/plugins/npapi/plugin_constants_win.cc +++ b/webkit/plugins/npapi/plugin_constants_win.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,7 +9,6 @@ namespace npapi { const char16 kNativeWindowClassName[] = L"NativeWindowClass"; const char16 kWrapperNativeWindowClassName[] = L"WrapperNativeWindowClass"; -const char16 kNativeWindowClassFilterProp[] = L"NativeWindowClassFilterProp"; const char16 kPaintMessageName[] = L"Chrome_CustomPaintil"; const char16 kRegistryMozillaPlugins[] = L"SOFTWARE\\MozillaPlugins"; const char16 kMozillaActiveXPlugin[] = L"npmozax.dll"; diff --git a/webkit/plugins/npapi/plugin_constants_win.h b/webkit/plugins/npapi/plugin_constants_win.h index edfbaaf..19742df 100644 --- a/webkit/plugins/npapi/plugin_constants_win.h +++ b/webkit/plugins/npapi/plugin_constants_win.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,9 +13,6 @@ namespace npapi { // The window class name for a plugin window. extern const char16 kNativeWindowClassName[]; -// If property is non-zero window reparenting must add UIPI message filters. -extern const char16 kNativeWindowClassFilterProp[]; - // The name of the window class name for the wrapper HWND around the actual // plugin window that's used when running in multi-process mode. This window // is created on the browser UI thread. |