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

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

Issue 18576005: [Mac] Adds a flag to force 10.6-style fullscreen for testing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased. Created 7 years, 5 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 | « chrome/browser/fullscreen.h ('k') | chrome/browser/ui/browser_commands_mac.cc » ('j') | 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"
10 #include "base/mac/mac_util.h"
11 #include "chrome/common/chrome_switches.h"
12
9 // Replicate specific 10.7 SDK declarations for building with prior SDKs. 13 // Replicate specific 10.7 SDK declarations for building with prior SDKs.
10 #if !defined(MAC_OS_X_VERSION_10_7) || \ 14 #if !defined(MAC_OS_X_VERSION_10_7) || \
11 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 15 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
12 16
13 enum { 17 enum {
14 NSApplicationPresentationFullScreen = 1 << 10 18 NSApplicationPresentationFullScreen = 1 << 10
15 }; 19 };
16 20
17 #endif // MAC_OS_X_VERSION_10_7 21 #endif // MAC_OS_X_VERSION_10_7
18 22
(...skipping 14 matching lines...) Expand all
33 // If both dock and menu bar are hidden, that is the equivalent of the Carbon 37 // If both dock and menu bar are hidden, that is the equivalent of the Carbon
34 // SystemUIMode (or Info.plist's LSUIPresentationMode) kUIModeAllHidden. 38 // SystemUIMode (or Info.plist's LSUIPresentationMode) kUIModeAllHidden.
35 if (dock_hidden && menu_hidden) 39 if (dock_hidden && menu_hidden)
36 return true; 40 return true;
37 41
38 if (options & NSApplicationPresentationFullScreen) 42 if (options & NSApplicationPresentationFullScreen)
39 return true; 43 return true;
40 44
41 return false; 45 return false;
42 } 46 }
47
48 namespace chrome {
49 namespace mac {
50
51 bool SupportsSystemFullscreen() {
52 const CommandLine* command_line = CommandLine::ForCurrentProcess();
53 if (command_line->HasSwitch(switches::kDisableSystemFullscreenForTesting))
54 return false;
55
56 return base::mac::IsOSLionOrLater();
57 }
58
59 } // namespace mac
60 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/fullscreen.h ('k') | chrome/browser/ui/browser_commands_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698