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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 10947019: Constrained Window Cocoa: Disable fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index 4a17393f6546a27e2f23f1b6bb7b757b49e47f0d..4a85bbc0011407948cc3d244582b62a5a98877ae 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -996,14 +996,6 @@ enum {
}
}
-- (BOOL)supportsFullscreen {
- // TODO(avi, thakis): GTMWindowSheetController has no api to move
- // tabsheets between windows. Until then, we have to prevent having to
- // move a tabsheet between windows, e.g. no fullscreen toggling
- NSArray* a = [[tabStripController_ sheetController] viewsWithAttachedSheets];
- return [a count] == 0;
-}
-
// Called to validate menu and toolbar items when this window is key. All the
// items we care about have been set with the |-commandDispatch:| or
// |-commandDispatchUsingKeyModifiers:| actions and a target of FirstResponder
@@ -1033,7 +1025,6 @@ enum {
enable &= !![[static_cast<NSMenuItem*>(item) keyEquivalent] length];
break;
case IDC_FULLSCREEN: {
- enable &= [self supportsFullscreen];
if ([static_cast<NSObject*>(item) isKindOfClass:[NSMenuItem class]]) {
NSString* menuTitle = l10n_util::GetNSString(
[self isFullscreen] && ![self inPresentationMode] ?
@@ -1047,7 +1038,6 @@ enum {
break;
}
case IDC_PRESENTATION_MODE: {
- enable &= [self supportsFullscreen];
if ([static_cast<NSObject*>(item) isKindOfClass:[NSMenuItem class]]) {
NSString* menuTitle = l10n_util::GetNSString(
[self inPresentationMode] ? IDS_EXIT_PRESENTATION_MAC :
@@ -1950,7 +1940,7 @@ willAnimateFromState:(bookmarks::VisualState)oldState
if (fullscreen == [self isFullscreen])
return;
- if (![self supportsFullscreen])
+ if (!chrome::IsCommandEnabled(browser_.get(), IDC_FULLSCREEN))
return;
if (base::mac::IsOSLionOrLater()) {
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698