1 // Copyright 2011 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #import "chrome/browser/fullscreen.h"
7 #import <Cocoa/Cocoa.h>
9 #include "base/command_line.h"
11 bool IsFullScreenMode() {
12 NSApplicationPresentationOptions options =
13 NSApp.currentSystemPresentationOptions;
15 bool dock_hidden = (options & NSApplicationPresentationHideDock) ||
16 (options & NSApplicationPresentationAutoHideDock);
18 bool menu_hidden = (options & NSApplicationPresentationHideMenuBar) ||
19 (options & NSApplicationPresentationAutoHideMenuBar);
21 // If both dock and menu bar are hidden, that is the equivalent of the Carbon
22 // SystemUIMode (or Info.plist's LSUIPresentationMode) kUIModeAllHidden.
23 if (dock_hidden && menu_hidden)
26 if (options & NSApplicationPresentationFullScreen)