#include "ui/views/color_constants.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/views_delegate.h"
-#include "ui/views/widget/native_widget_aura.h"
+#include "ui/views/widget/native_widget_private.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/window/client_view.h"
const gfx::FontList& GetTitleFontList() {
static const gfx::FontList title_font_list =
- NativeWidgetAura::GetWindowTitleFontList();
+ internal::NativeWidgetPrivate::GetWindowTitleFontList();
return title_font_list;
}
}
void CustomFrameView::UpdateWindowTitle() {
- SchedulePaintInRect(title_bounds_);
+ if (frame_->widget_delegate()->ShouldShowWindowTitle())
+ SchedulePaintInRect(title_bounds_);
}
///////////////////////////////////////////////////////////////////////////////
// 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_;
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();