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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 42624: Moving the mouse-wheel processing code out of the FocusManager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | chrome/views/focus/focus_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_view_win.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 12500)
+++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
@@ -25,6 +25,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/common/win_util.h"
+#include "chrome/views/focus/focus_util_win.h"
// Included for views::kReflectedMessage - TODO(beng): move this to win_util.h!
#include "chrome/views/widget/widget_win.h"
#include "grit/webkit_resources.h"
@@ -467,6 +468,9 @@
// of a browser process.
OnInputLangChange(0, 0);
TRACK_HWND_CREATION(m_hWnd);
+ // Marks that window as supporting mouse-wheel messages rerouting so it is
+ // scrolled when under the mouse pointer even if inactive.
+ views::SetWindowSupportsRerouteMouseWheel(m_hWnd);
return 0;
}
@@ -869,6 +873,14 @@
reinterpret_cast<LPARAM>(toplevel_hwnd));
}
+ // Forward the mouse-wheel message to the window under the mouse if it belongs
+ // to us.
+ if (message == WM_MOUSEWHEEL &&
+ views::RerouteMouseWheel(m_hWnd, wparam, lparam)) {
+ handled = TRUE;
+ return 0;
+ }
+
// This is a bit of a hack, but will work for now since we don't want to
// pollute this object with WebContents-specific functionality...
bool handled_by_webcontents = false;
« no previous file with comments | « no previous file | chrome/views/focus/focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698