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

Side by Side Diff: chrome/browser/fullscreen_mac.mm

Issue 2406753003: Mac: Remove deprecated call to CGDisplayIsCaptured IsFullScreenMode(). (Closed)
Patch Set: Remove unrelated patchset dep Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 #import "chrome/browser/fullscreen.h" 5 #import "chrome/browser/fullscreen.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 10
11 bool IsFullScreenMode() { 11 bool IsFullScreenMode() {
12 // Check if the main display has been captured (by games in particular).
13 if (CGDisplayIsCaptured(CGMainDisplayID()))
14 return true;
15
16 NSApplicationPresentationOptions options = 12 NSApplicationPresentationOptions options =
17 [NSApp currentSystemPresentationOptions]; 13 [NSApp currentSystemPresentationOptions];
18 14
19 bool dock_hidden = (options & NSApplicationPresentationHideDock) || 15 bool dock_hidden = (options & NSApplicationPresentationHideDock) ||
20 (options & NSApplicationPresentationAutoHideDock); 16 (options & NSApplicationPresentationAutoHideDock);
21 17
22 bool menu_hidden = (options & NSApplicationPresentationHideMenuBar) || 18 bool menu_hidden = (options & NSApplicationPresentationHideMenuBar) ||
23 (options & NSApplicationPresentationAutoHideMenuBar); 19 (options & NSApplicationPresentationAutoHideMenuBar);
24 20
25 // If both dock and menu bar are hidden, that is the equivalent of the Carbon 21 // If both dock and menu bar are hidden, that is the equivalent of the Carbon
26 // SystemUIMode (or Info.plist's LSUIPresentationMode) kUIModeAllHidden. 22 // SystemUIMode (or Info.plist's LSUIPresentationMode) kUIModeAllHidden.
27 if (dock_hidden && menu_hidden) 23 if (dock_hidden && menu_hidden)
28 return true; 24 return true;
29 25
30 if (options & NSApplicationPresentationFullScreen) 26 if (options & NSApplicationPresentationFullScreen)
31 return true; 27 return true;
32 28
33 return false; 29 return false;
34 } 30 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698