Merge pull request #9788 from shubham2892/Add-option-to-show-title-text-in-titlebar-in-fullscreen

Add alwaysShowTitleTextInFullscreen flag
This commit is contained in:
Kevin Sawicki 2017-07-14 11:58:12 -07:00 committed by GitHub
commit 5581d1d652
5 changed files with 19 additions and 2 deletions

View file

@ -355,7 +355,9 @@ bool ScopedDisableResize::disable_resize_ = false;
base::mac::IsAtLeastOS10_10() &&
// FIXME(zcbenz): Showing titlebar for hiddenInset window is weird under
// fullscreen mode.
shell_->title_bar_style() != atom::NativeWindowMac::HIDDEN_INSET) {
// Show title if fullscreen_window_title flag is set
(shell_->title_bar_style() != atom::NativeWindowMac::HIDDEN_INSET ||
shell_->fullscreen_window_title())) {
[window setTitleVisibility:NSWindowTitleVisible];
}
@ -379,7 +381,8 @@ bool ScopedDisableResize::disable_resize_ = false;
NSWindow* window = shell_->GetNativeWindow();
if ((shell_->transparent() || !shell_->has_frame()) &&
base::mac::IsAtLeastOS10_10() &&
shell_->title_bar_style() != atom::NativeWindowMac::HIDDEN_INSET) {
(shell_->title_bar_style() != atom::NativeWindowMac::HIDDEN_INSET ||
shell_->fullscreen_window_title())) {
[window setTitleVisibility:NSWindowTitleHidden];
}
@ -814,6 +817,7 @@ NativeWindowMac::NativeWindowMac(
is_kiosk_(false),
was_fullscreen_(false),
zoom_to_page_width_(false),
fullscreen_window_title_(false),
attention_request_id_(0),
title_bar_style_(NORMAL) {
int width = 800, height = 600;
@ -959,6 +963,8 @@ NativeWindowMac::NativeWindowMac(
options.Get(options::kZoomToPageWidth, &zoom_to_page_width_);
options.Get(options::kFullscreenWindowTitle, &fullscreen_window_title_);
// Enable the NSView to accept first mouse event.
bool acceptsFirstMouse = false;
options.Get(options::kAcceptFirstMouse, &acceptsFirstMouse);