summaryrefslogtreecommitdiffstats
path: root/views/focus/focus_util_win.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-01 16:57:13 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-01 16:57:13 +0000
commit7c9d829192359328576965fe8a4a52a5ad6c7da3 (patch)
tree6f06ef0a1bd4f797ad2c9f2968950b625867136c /views/focus/focus_util_win.h
parent9d3fcf8bc99dfdfef66b983af69802ddbe76514d (diff)
downloadchromium_src-7c9d829192359328576965fe8a4a52a5ad6c7da3.zip
chromium_src-7c9d829192359328576965fe8a4a52a5ad6c7da3.tar.gz
chromium_src-7c9d829192359328576965fe8a4a52a5ad6c7da3.tar.bz2
Attempt at fixing leaks from SetProp. Apparently there is a finite
amount of memory reserved for properties and Windows doesn't always automatically free up the memory if the window is deleted without an explicit remove. For the time being I've made it easier to track SetProp leaks, but we may want to move to using something other than SetProp in the future that isn't as fragile. I didn't fix a couple of places that were trickier. I'm going to file separate bugs on them. BUG=44991 TEST=none Review URL: http://codereview.chromium.org/4195003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64619 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus/focus_util_win.h')
-rw-r--r--views/focus/focus_util_win.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/views/focus/focus_util_win.h b/views/focus/focus_util_win.h
index 7a85720..2c53c68 100644
--- a/views/focus/focus_util_win.h
+++ b/views/focus/focus_util_win.h
@@ -8,12 +8,19 @@
#include <windows.h>
+namespace app {
+namespace win {
+class ScopedProp;
+}
+}
+
namespace views {
// Marks the passed |hwnd| as supporting mouse-wheel message rerouting.
// We reroute the mouse wheel messages to such HWND when they are under the
-// mouse pointer (but are not the active window)
-void SetWindowSupportsRerouteMouseWheel(HWND hwnd);
+// mouse pointer (but are not the active window). Callers must delete the
+// returned object before the window is destroyed (see ScopedProp for details).
+app::win::ScopedProp* SetWindowSupportsRerouteMouseWheel(HWND hwnd);
// Forwards mouse wheel messages to the window under it.
// Windows sends mouse wheel messages to the currently active window.