diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-08 06:17:55 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-08 06:17:55 +0000 |
commit | ce74a7c1c38c0b3c0569186e3bee172009bb61b3 (patch) | |
tree | 163f25f0b9ac6c9b503258b683c328e42ab2b4df /base | |
parent | f2d507199e85ca69b1449ef05cc2163f1340b3aa (diff) | |
download | chromium_src-ce74a7c1c38c0b3c0569186e3bee172009bb61b3.zip chromium_src-ce74a7c1c38c0b3c0569186e3bee172009bb61b3.tar.gz chromium_src-ce74a7c1c38c0b3c0569186e3bee172009bb61b3.tar.bz2 |
Use base::WindowImpl instead of CWindowImpl to reduce dependencies on ATL.
BUG=5022
TEST=test_shell_tests
Review URL: http://codereview.chromium.org/165188
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22864 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/window_impl.cc | 14 | ||||
-rw-r--r-- | base/window_impl.h | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/base/window_impl.cc b/base/window_impl.cc index d428ebe..4a37f7b 100644 --- a/base/window_impl.cc +++ b/base/window_impl.cc @@ -126,9 +126,19 @@ void WindowImpl::Init(HWND parent, const gfx::Rect& bounds) { parent = NULL; } + int x, y, width, height; + if (bounds.IsEmpty()) { + x = y = width = height = CW_USEDEFAULT; + } else { + x = bounds.x(); + y = bounds.y(); + width = bounds.width(); + height = bounds.height(); + } + hwnd_ = CreateWindowEx(window_ex_style_, GetWindowClassName().c_str(), L"", - window_style_, bounds.x(), bounds.y(), bounds.width(), - bounds.height(), parent, NULL, NULL, this); + window_style_, x, y, width, height, + parent, NULL, NULL, this); DCHECK(hwnd_); // The window procedure should have set the data for us. diff --git a/base/window_impl.h b/base/window_impl.h index eb1de35d..30c6298 100644 --- a/base/window_impl.h +++ b/base/window_impl.h @@ -31,7 +31,7 @@ class WindowImpl { WindowImpl(); virtual ~WindowImpl(); - BEGIN_MSG_MAP_EX(WidgetWin) + BEGIN_MSG_MAP_EX(WindowImpl) // No messages to handle END_MSG_MAP() |