diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 05:43:17 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 05:43:17 +0000 |
commit | a8da3a55ce6358c92cc976f105567f67789a2510 (patch) | |
tree | 26f58f20a9ab36ffe2cc8d563edacec5dfc7d3dd /chrome/views/window.cc | |
parent | f73bdc8c33f0b395ba058083505209baeedf9f38 (diff) | |
download | chromium_src-a8da3a55ce6358c92cc976f105567f67789a2510.zip chromium_src-a8da3a55ce6358c92cc976f105567f67789a2510.tar.gz chromium_src-a8da3a55ce6358c92cc976f105567f67789a2510.tar.bz2 |
Make HWNDViewContainer set up its contents view separately from its Init method.
This is needed as a first step in further adjustments I'm going to be making to
Window, ClientView, etc.
B=1280060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/window.cc')
-rw-r--r-- | chrome/views/window.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/views/window.cc b/chrome/views/window.cc index b02afcb..042968b 100644 --- a/chrome/views/window.cc +++ b/chrome/views/window.cc @@ -116,18 +116,18 @@ void Window::Init(HWND parent, const gfx::Rect& bounds) { // associated with the root of the window tree... if (use_client_view_) { View* contents_view = window_delegate_->GetContentsView(); - if (!contents_view) - contents_view = new View; + DCHECK(contents_view); client_view_ = new ClientView(this, contents_view); // A Window almost always owns its own focus manager, even if it's a child // window. File a bug if you find a circumstance where this isn't the case // and we can adjust this API. Note that if this is not the case, you'll // also have to change SetInitialFocus() as it relies on the window's focus // manager. - HWNDViewContainer::Init(parent, bounds, client_view_, true); + HWNDViewContainer::Init(parent, bounds, true); + SetContentsView(client_view_); } else { - HWNDViewContainer::Init(parent, bounds, - window_delegate_->GetContentsView(), true); + HWNDViewContainer::Init(parent, bounds, true); + SetContentsView(window_delegate_->GetContentsView()); } win_util::SetWindowUserData(GetHWND(), this); |