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

Unified Diff: base/window_impl.cc

Issue 165188: Use base::WindowImpl instead of CWindowImpl to reduce dependencies on ATL.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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
Index: base/window_impl.cc
===================================================================
--- base/window_impl.cc (revision 22832)
+++ base/window_impl.cc (working copy)
@@ -126,9 +126,19 @@
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.

Powered by Google App Engine
This is Rietveld 408576698