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

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

Issue 1414033009: Implement a Menu Item to Hide the Toolbar in Fullscreen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 } 427 }
428 428
429 bool BrowserWindowCocoa::IsFullscreen() const { 429 bool BrowserWindowCocoa::IsFullscreen() const {
430 return [controller_ isInAnyFullscreenMode]; 430 return [controller_ isInAnyFullscreenMode];
431 } 431 }
432 432
433 bool BrowserWindowCocoa::IsFullscreenBubbleVisible() const { 433 bool BrowserWindowCocoa::IsFullscreenBubbleVisible() const {
434 return false; 434 return false;
435 } 435 }
436 436
437 bool BrowserWindowCocoa::SupportsFullscreenWithToolbar() const {
438 return chrome::mac::SupportsSystemFullscreen();
439 }
440
441 void BrowserWindowCocoa::UpdateFullscreenWithToolbar(bool with_toolbar) { 437 void BrowserWindowCocoa::UpdateFullscreenWithToolbar(bool with_toolbar) {
442 [controller_ updateFullscreenWithToolbar:with_toolbar]; 438 [controller_ updateFullscreenWithToolbar:with_toolbar];
443 } 439 }
444 440
441 void BrowserWindowCocoa::ToggleFullscreenToolbar() {
442 [controller_ toggleFullscreenToolbar];
443 }
444
445 bool BrowserWindowCocoa::IsFullscreenWithToolbar() const { 445 bool BrowserWindowCocoa::IsFullscreenWithToolbar() const {
446 return IsFullscreen() && ![controller_ inPresentationMode]; 446 return IsFullscreen() && ![controller_ inPresentationMode];
447 } 447 }
448 448
449 bool BrowserWindowCocoa::ShouldHideFullscreenToolbar() const {
450 return [controller_ shouldHideFullscreenToolbar];
451 }
452
449 void BrowserWindowCocoa::ConfirmAddSearchProvider( 453 void BrowserWindowCocoa::ConfirmAddSearchProvider(
450 TemplateURL* template_url, 454 TemplateURL* template_url,
451 Profile* profile) { 455 Profile* profile) {
452 // The controller will release itself when the window closes. 456 // The controller will release itself when the window closes.
453 EditSearchEngineCocoaController* editor = 457 EditSearchEngineCocoaController* editor =
454 [[EditSearchEngineCocoaController alloc] initWithProfile:profile 458 [[EditSearchEngineCocoaController alloc] initWithProfile:profile
455 delegate:NULL 459 delegate:NULL
456 templateURL:template_url]; 460 templateURL:template_url];
457 [NSApp beginSheet:[editor window] 461 [NSApp beginSheet:[editor window]
458 modalForWindow:window() 462 modalForWindow:window()
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 void BrowserWindowCocoa::UnhideDownloadShelf() { 859 void BrowserWindowCocoa::UnhideDownloadShelf() {
856 GetDownloadShelf()->Unhide(); 860 GetDownloadShelf()->Unhide();
857 } 861 }
858 862
859 void BrowserWindowCocoa::HideDownloadShelf() { 863 void BrowserWindowCocoa::HideDownloadShelf() {
860 GetDownloadShelf()->Hide(); 864 GetDownloadShelf()->Hide();
861 StatusBubble* statusBubble = GetStatusBubble(); 865 StatusBubble* statusBubble = GetStatusBubble();
862 if (statusBubble) 866 if (statusBubble)
863 statusBubble->Hide(); 867 statusBubble->Hide();
864 } 868 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698