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

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

Issue 322623002: Consolidate SDK forwards in sdk_forward_declarations.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 6 years, 6 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 | Annotate | Revision Log
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 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
11 #include "base/mac/sdk_forward_declarations.h"
11 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
12 13
13 // Replicate specific 10.7 SDK declarations for building with prior SDKs.
14 #if !defined(MAC_OS_X_VERSION_10_7) || \
15 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
16
17 enum {
18 NSApplicationPresentationFullScreen = 1 << 10
19 };
20
21 #endif // MAC_OS_X_VERSION_10_7
22
23 bool IsFullScreenMode() { 14 bool IsFullScreenMode() {
24 // Check if the main display has been captured (by games in particular). 15 // Check if the main display has been captured (by games in particular).
25 if (CGDisplayIsCaptured(CGMainDisplayID())) 16 if (CGDisplayIsCaptured(CGMainDisplayID()))
26 return true; 17 return true;
27 18
28 NSApplicationPresentationOptions options = 19 NSApplicationPresentationOptions options =
29 [NSApp currentSystemPresentationOptions]; 20 [NSApp currentSystemPresentationOptions];
30 21
31 bool dock_hidden = (options & NSApplicationPresentationHideDock) || 22 bool dock_hidden = (options & NSApplicationPresentationHideDock) ||
32 (options & NSApplicationPresentationAutoHideDock); 23 (options & NSApplicationPresentationAutoHideDock);
(...skipping 18 matching lines...) Expand all
51 bool SupportsSystemFullscreen() { 42 bool SupportsSystemFullscreen() {
52 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 43 const CommandLine* command_line = CommandLine::ForCurrentProcess();
53 if (command_line->HasSwitch(switches::kDisableSystemFullscreenForTesting)) 44 if (command_line->HasSwitch(switches::kDisableSystemFullscreenForTesting))
54 return false; 45 return false;
55 46
56 return base::mac::IsOSLionOrLater(); 47 return base::mac::IsOSLionOrLater();
57 } 48 }
58 49
59 } // namespace mac 50 } // namespace mac
60 } // namespace chrome 51 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698