diff options
author | levin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-14 03:00:30 +0000 |
---|---|---|
committer | levin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-14 03:00:30 +0000 |
commit | 672eca0fd191acd39c28430d1ed1f327594faff8 (patch) | |
tree | 56d0070a11a25756240d0a3088458dd7a7fad32d /base/window_impl.cc | |
parent | f4078cf39908bfada67c0614ffc5ee8e4af765a2 (diff) | |
download | chromium_src-672eca0fd191acd39c28430d1ed1f327594faff8.zip chromium_src-672eca0fd191acd39c28430d1ed1f327594faff8.tar.gz chromium_src-672eca0fd191acd39c28430d1ed1f327594faff8.tar.bz2 |
Reverting 23406.
It seems that Tab2OutOfTabStrip is failing consistently after this change.
BUG=None
TEST=None
TBR=jhawkins@chromium.org
Review URL: http://codereview.chromium.org/164543
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23411 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/window_impl.cc')
-rw-r--r-- | base/window_impl.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/base/window_impl.cc b/base/window_impl.cc index c3b3ad4..4a37f7b 100644 --- a/base/window_impl.cc +++ b/base/window_impl.cc @@ -96,7 +96,7 @@ class ClassRegistrar { typedef std::list<RegisteredClass> RegisteredClasses; RegisteredClasses registered_classes_; - // Counter of how many classes have been registered so far. + // Counter of how many classes have ben registered so far. int registered_count_; DISALLOW_COPY_AND_ASSIGN(ClassRegistrar); @@ -136,7 +136,7 @@ void WindowImpl::Init(HWND parent, const gfx::Rect& bounds) { height = bounds.height(); } - hwnd_ = CreateWindowEx(window_ex_style_, GetWindowClassName().c_str(), NULL, + hwnd_ = CreateWindowEx(window_ex_style_, GetWindowClassName().c_str(), L"", window_style_, x, y, width, height, parent, NULL, NULL, this); DCHECK(hwnd_); @@ -145,17 +145,27 @@ void WindowImpl::Init(HWND parent, const gfx::Rect& bounds) { DCHECK(win_util::GetWindowUserData(hwnd_) == this); } +gfx::NativeView WindowImpl::GetNativeView() const { + return hwnd_; +} + HICON WindowImpl::GetDefaultWindowIcon() const { return NULL; } +BOOL WindowImpl::DestroyWindow() { + DCHECK(::IsWindow(GetNativeView())); + return ::DestroyWindow(GetNativeView()); +} + LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) { + HWND window = GetNativeView(); LRESULT result = 0; // Handle the message if it's in our message map; otherwise, let the system // handle it. - if (!ProcessWindowMessage(hwnd_, message, w_param, l_param, result)) - result = DefWindowProc(hwnd_, message, w_param, l_param); + if (!ProcessWindowMessage(window, message, w_param, l_param, result)) + result = DefWindowProc(window, message, w_param, l_param); return result; } |