Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 1681463003: Preference for Presentation Mode/Fullscreen Toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/sdk_forward_declarations.h" 10 #import "base/mac/sdk_forward_declarations.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 454
455 bool BrowserWindowCocoa::SupportsFullscreenWithToolbar() const { 455 bool BrowserWindowCocoa::SupportsFullscreenWithToolbar() const {
456 return chrome::mac::SupportsSystemFullscreen(); 456 return chrome::mac::SupportsSystemFullscreen();
457 } 457 }
458 458
459 void BrowserWindowCocoa::UpdateFullscreenWithToolbar(bool with_toolbar) { 459 void BrowserWindowCocoa::UpdateFullscreenWithToolbar(bool with_toolbar) {
460 [controller_ updateFullscreenWithToolbar:with_toolbar]; 460 [controller_ updateFullscreenWithToolbar:with_toolbar];
461 } 461 }
462 462
463 void BrowserWindowCocoa::ToggleFullscreenToolbar() { 463 void BrowserWindowCocoa::ToggleFullscreenToolbar() {
464 [controller_ toggleFullscreenToolbar]; 464 PrefService* prefs = browser_->profile()->GetPrefs();
465 bool hideToolbar = !prefs->GetBoolean(prefs::kHideFullscreenToolbar);
466 [controller_ setFullscreenToolbarHidden:hideToolbar];
467 prefs->SetBoolean(prefs::kHideFullscreenToolbar, hideToolbar);
465 } 468 }
466 469
467 bool BrowserWindowCocoa::IsFullscreenWithToolbar() const { 470 bool BrowserWindowCocoa::IsFullscreenWithToolbar() const {
468 return IsFullscreen() && ![controller_ inPresentationMode]; 471 return IsFullscreen() && ![controller_ inPresentationMode];
469 } 472 }
470 473
471 bool BrowserWindowCocoa::ShouldHideFullscreenToolbar() const { 474 bool BrowserWindowCocoa::ShouldHideFullscreenToolbar() const {
472 return [controller_ shouldHideFullscreenToolbar]; 475 return [controller_ shouldHideFullscreenToolbar];
473 } 476 }
474 477
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 void BrowserWindowCocoa::UnhideDownloadShelf() { 897 void BrowserWindowCocoa::UnhideDownloadShelf() {
895 GetDownloadShelf()->Unhide(); 898 GetDownloadShelf()->Unhide();
896 } 899 }
897 900
898 void BrowserWindowCocoa::HideDownloadShelf() { 901 void BrowserWindowCocoa::HideDownloadShelf() {
899 GetDownloadShelf()->Hide(); 902 GetDownloadShelf()->Hide();
900 StatusBubble* statusBubble = GetStatusBubble(); 903 StatusBubble* statusBubble = GetStatusBubble();
901 if (statusBubble) 904 if (statusBubble)
902 statusBubble->Hide(); 905 statusBubble->Hide();
903 } 906 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/accelerators_cocoa_browsertest.mm ('k') | chrome/browser/ui/cocoa/browser_window_command_handler.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698