diff options
author | dpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-29 18:01:56 +0000 |
---|---|---|
committer | dpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-29 18:01:56 +0000 |
commit | 87244af04147bd7c85f12f2cf3906e6cdce20046 (patch) | |
tree | 73893494d7dcb7ece866ceca65fa1d960d6286f5 /views | |
parent | 0ed1a2bfbac22a273022d8980987d7a8b6dc338d (diff) | |
download | chromium_src-87244af04147bd7c85f12f2cf3906e6cdce20046.zip chromium_src-87244af04147bd7c85f12f2cf3906e6cdce20046.tar.gz chromium_src-87244af04147bd7c85f12f2cf3906e6cdce20046.tar.bz2 |
Window::InitWindow shouldn't replace frame view with default if custom frame set
BubbleWindow::Create sets custom frame view before calling InitWindow. But InitWindow replaces it with default one. LoginHtmlDialog::Show casts frame view to BubbleFrameView but actually it is NonClientFrameView due to InitWindow. So accidentally CloseWindow is called instead of StartThrobber.
BUG=chromium-os:14669
TEST=manual
Review URL: http://codereview.chromium.org/6902149
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83545 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/window/window.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/views/window/window.cc b/views/window/window.cc index ae9e155..13f2515 100644 --- a/views/window/window.cc +++ b/views/window/window.cc @@ -97,7 +97,9 @@ void Window::InitWindow(const InitParams& params) { DCHECK(window_delegate_); DCHECK(!window_delegate_->window_); window_delegate_->window_ = this; - non_client_view()->SetFrameView(CreateFrameViewForWindow()); + // If frame_view was set already, don't replace it with default one. + if (!non_client_view()->frame_view()) + non_client_view()->SetFrameView(CreateFrameViewForWindow()); AsWidget()->Init(params.widget_init_params); OnNativeWindowCreated(params.widget_init_params.bounds); } |