diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-09 11:50:55 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-09 11:50:55 +0000 |
commit | 6f6f1ef623101f1a48866e9f9aaa645421f8e375 (patch) | |
tree | d5ed4de6872f39581c3e58603f73b1c78423e02c /ui/views/window | |
parent | b569b3570817d3c433003f6953c81f6a289382d2 (diff) | |
download | chromium_src-6f6f1ef623101f1a48866e9f9aaa645421f8e375.zip chromium_src-6f6f1ef623101f1a48866e9f9aaa645421f8e375.tar.gz chromium_src-6f6f1ef623101f1a48866e9f9aaa645421f8e375.tar.bz2 |
Respect WidgetDelegate::ShouldShowWindowTitle in CustomFrameView.
This lets chrome apps hide their window title when running with the
standard frame when DWM is not enabled.
BUG=367598
Review URL: https://codereview.chromium.org/264383004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/window')
-rw-r--r-- | ui/views/window/custom_frame_view.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/views/window/custom_frame_view.cc b/ui/views/window/custom_frame_view.cc index 4075f6b..cfb34e6 100644 --- a/ui/views/window/custom_frame_view.cc +++ b/ui/views/window/custom_frame_view.cc @@ -192,7 +192,8 @@ void CustomFrameView::UpdateWindowIcon() { } void CustomFrameView::UpdateWindowTitle() { - SchedulePaintInRect(title_bounds_); + if (frame_->widget_delegate()->ShouldShowWindowTitle()) + SchedulePaintInRect(title_bounds_); } /////////////////////////////////////////////////////////////////////////////// @@ -379,7 +380,7 @@ void CustomFrameView::PaintTitleBar(gfx::Canvas* canvas) { // It seems like in some conditions we can be asked to paint after the window // that contains us is WM_DESTROYed. At this point, our delegate is NULL. The // correct long term fix may be to shut down the RootView in WM_DESTROY. - if (!delegate) + if (!delegate || !delegate->ShouldShowWindowTitle()) return; gfx::Rect rect = title_bounds_; @@ -538,6 +539,9 @@ void CustomFrameView::LayoutTitleBar() { if (show_window_icon) window_icon_->SetBoundsRect(icon_bounds); + if (!frame_->widget_delegate()->ShouldShowWindowTitle()) + return; + // The offset between the window left edge and the title text. int title_x = show_window_icon ? icon_bounds.right() + kTitleIconOffsetX : icon_bounds.x(); |