[M85 Dev][EFL] Fix errors to generate ninja files
[platform/framework/web/chromium-efl.git] / chrome / browser / fullscreen_mac.mm
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "chrome/browser/fullscreen.h"
6
7 #import <Cocoa/Cocoa.h>
8
9 #include "base/command_line.h"
10
11 bool IsFullScreenMode() {
12   NSApplicationPresentationOptions options =
13       [NSApp currentSystemPresentationOptions];
14
15   bool dock_hidden = (options & NSApplicationPresentationHideDock) ||
16                      (options & NSApplicationPresentationAutoHideDock);
17
18   bool menu_hidden = (options & NSApplicationPresentationHideMenuBar) ||
19                      (options & NSApplicationPresentationAutoHideMenuBar);
20
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)
24     return true;
25
26   if (options & NSApplicationPresentationFullScreen)
27     return true;
28
29   return false;
30 }