summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 23:15:10 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 23:15:10 +0000
commit0aaec000440c2453f20265a7b580efc4ad10b282 (patch)
treec1739e498cf814750a0c63495a3ebca358117261 /base
parentf5c8a1596de89f2f3010186b03cc2378d23254ae (diff)
downloadchromium_src-0aaec000440c2453f20265a7b580efc4ad10b282.zip
chromium_src-0aaec000440c2453f20265a7b580efc4ad10b282.tar.gz
chromium_src-0aaec000440c2453f20265a7b580efc4ad10b282.tar.bz2
Relanding the NativeViewHost refactoring (it was breaking the ChromeOS build).
Refactoring some of the NativeViewHost and NativeControl focus management so their consumers don't have to explicitly set the focused view. See original review: http://codereview.chromium.org/235011/show BUG=None TEST=Run all tests. Make sure focus is stored/restored properly in Chrome. TBR=ben Review URL: http://codereview.chromium.org/246032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/win_util.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/base/win_util.cc b/base/win_util.cc
index 4fa1df0..3e105e8 100644
--- a/base/win_util.cc
+++ b/base/win_util.cc
@@ -279,6 +279,8 @@ bool Subclass(HWND window, WNDPROC subclass_proc) {
WNDPROC original_handler =
reinterpret_cast<WNDPROC>(GetWindowLongPtr(window, GWLP_WNDPROC));
if (original_handler != subclass_proc) {
+ DCHECK(!GetProp(window, kHandlerKey)) << "subclassing a HWND more than "
+ "once";
win_util::SetWindowProc(window, subclass_proc);
SetProp(window, kHandlerKey, original_handler);
return true;