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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 7757004: RenderWidgetHostViewWin::ReparentWindow should call RemovePropW if kNativeWindowClassFilterProp i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Need Win 7 headers for WM_GESTURE and ChangeWindowMessageFilterEx 5 // Need Win 7 headers for WM_GESTURE and ChangeWindowMessageFilterEx
6 // TODO(jschuh): See crbug.com/92941 for longterm fix. 6 // TODO(jschuh): See crbug.com/92941 for longterm fix.
7 #undef WINVER 7 #undef WINVER
8 #define WINVER _WIN32_WINNT_WIN7 8 #define WINVER _WIN32_WINNT_WIN7
9 #undef _WIN32_WINNT 9 #undef _WIN32_WINNT
10 #define _WIN32_WINNT _WIN32_WINNT_WIN7 10 #define _WIN32_WINNT _WIN32_WINNT_WIN7
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 if (!g_ChangeWindowMessageFilterEx) { 465 if (!g_ChangeWindowMessageFilterEx) {
466 g_ChangeWindowMessageFilterEx = 466 g_ChangeWindowMessageFilterEx =
467 reinterpret_cast<ChangeWindowMessageFilterExFunction>( 467 reinterpret_cast<ChangeWindowMessageFilterExFunction>(
468 ::GetProcAddress(::GetModuleHandle(L"user32.dll"), 468 ::GetProcAddress(::GetModuleHandle(L"user32.dll"),
469 "ChangeWindowMessageFilterEx")); 469 "ChangeWindowMessageFilterEx"));
470 } 470 }
471 // Process-wide message filters required on Vista must be added to: 471 // Process-wide message filters required on Vista must be added to:
472 // chrome_content_client.cc ChromeContentClient::SandboxPlugin 472 // chrome_content_client.cc ChromeContentClient::SandboxPlugin
473 g_ChangeWindowMessageFilterEx(parent, WM_MOUSEWHEEL, MSGFLT_ALLOW, NULL); 473 g_ChangeWindowMessageFilterEx(parent, WM_MOUSEWHEEL, MSGFLT_ALLOW, NULL);
474 g_ChangeWindowMessageFilterEx(parent, WM_GESTURE, MSGFLT_ALLOW, NULL); 474 g_ChangeWindowMessageFilterEx(parent, WM_GESTURE, MSGFLT_ALLOW, NULL);
475 ::SetPropW(orig_parent, webkit::npapi::kNativeWindowClassFilterProp, NULL); 475 ::RemovePropW(orig_parent, webkit::npapi::kNativeWindowClassFilterProp);
476 } 476 }
477 ::SetParent(window, parent); 477 ::SetParent(window, parent);
478 BrowserThread::PostTask( 478 BrowserThread::PostTask(
479 BrowserThread::IO, FROM_HERE, 479 BrowserThread::IO, FROM_HERE,
480 new NotifyPluginProcessHostTask(window, parent)); 480 new NotifyPluginProcessHostTask(window, parent));
481 return parent; 481 return parent;
482 } 482 }
483 483
484 static BOOL CALLBACK AddChildWindowToVector(HWND hwnd, LPARAM lparam) { 484 static BOOL CALLBACK AddChildWindowToVector(HWND hwnd, LPARAM lparam) {
485 std::vector<HWND>* vector = reinterpret_cast<std::vector<HWND>*>(lparam); 485 std::vector<HWND>* vector = reinterpret_cast<std::vector<HWND>*>(lparam);
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 DWORD ex_style) { 1853 DWORD ex_style) {
1854 parent_hwnd_ = parent_hwnd; 1854 parent_hwnd_ = parent_hwnd;
1855 Create(parent_hwnd_, NULL, NULL, WS_POPUP, ex_style); 1855 Create(parent_hwnd_, NULL, NULL, WS_POPUP, ex_style);
1856 MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE); 1856 MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE);
1857 // To show tooltip on popup window.(e.g. title in <select>) 1857 // To show tooltip on popup window.(e.g. title in <select>)
1858 // Popups default to showing, which means |DidBecomeSelected()| isn't invoked. 1858 // Popups default to showing, which means |DidBecomeSelected()| isn't invoked.
1859 // Ensure the tooltip is created otherwise tooltips are never shown. 1859 // Ensure the tooltip is created otherwise tooltips are never shown.
1860 EnsureTooltip(); 1860 EnsureTooltip();
1861 ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA); 1861 ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA);
1862 } 1862 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698