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

Side by Side Diff: base/mac/mac_util.mm

Issue 322623002: Consolidate SDK forwards in sdk_forward_declarations.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "base/mac/mac_util.h" 5 #include "base/mac/mac_util.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #import <IOKit/IOKitLib.h> 8 #import <IOKit/IOKitLib.h>
9 9
10 #include <errno.h> 10 #include <errno.h>
11 #include <string.h> 11 #include <string.h>
12 #include <sys/utsname.h> 12 #include <sys/utsname.h>
13 #include <sys/xattr.h> 13 #include <sys/xattr.h>
14 14
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/mac/bundle_locations.h" 17 #include "base/mac/bundle_locations.h"
18 #include "base/mac/foundation_util.h" 18 #include "base/mac/foundation_util.h"
19 #include "base/mac/mac_logging.h" 19 #include "base/mac/mac_logging.h"
20 #include "base/mac/scoped_cftyperef.h" 20 #include "base/mac/scoped_cftyperef.h"
21 #include "base/mac/scoped_ioobject.h" 21 #include "base/mac/scoped_ioobject.h"
22 #include "base/mac/scoped_nsobject.h" 22 #include "base/mac/scoped_nsobject.h"
23 #include "base/mac/sdk_forward_declarations.h"
23 #include "base/strings/string_number_conversions.h" 24 #include "base/strings/string_number_conversions.h"
24 #include "base/strings/string_piece.h" 25 #include "base/strings/string_piece.h"
25 #include "base/strings/sys_string_conversions.h" 26 #include "base/strings/sys_string_conversions.h"
26 27
27 namespace base { 28 namespace base {
28 namespace mac { 29 namespace mac {
29 30
30 // Replicate specific 10.7 SDK declarations for building with prior SDKs.
31 #if !defined(MAC_OS_X_VERSION_10_7) || \
32 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
33
34 enum {
35 NSApplicationPresentationFullScreen = 1 << 10
36 };
37
38 #endif // MAC_OS_X_VERSION_10_7
39
40 namespace { 31 namespace {
41 32
42 // The current count of outstanding requests for full screen mode from browser 33 // The current count of outstanding requests for full screen mode from browser
43 // windows, plugins, etc. 34 // windows, plugins, etc.
44 int g_full_screen_requests[kNumFullScreenModes] = { 0 }; 35 int g_full_screen_requests[kNumFullScreenModes] = { 0 };
45 36
46 // Sets the appropriate application presentation option based on the current 37 // Sets the appropriate application presentation option based on the current
47 // full screen requests. Since only one presentation option can be active at a 38 // full screen requests. Since only one presentation option can be active at a
48 // given time, full screen requests are ordered by priority. If there are no 39 // given time, full screen requests are ordered by priority. If there are no
49 // outstanding full screen requests, reverts to normal mode. If the correct 40 // outstanding full screen requests, reverts to normal mode. If the correct
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) 569 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp))
579 return false; 570 return false;
580 *type = ident.substr(0, number_loc); 571 *type = ident.substr(0, number_loc);
581 *major = major_tmp; 572 *major = major_tmp;
582 *minor = minor_tmp; 573 *minor = minor_tmp;
583 return true; 574 return true;
584 } 575 }
585 576
586 } // namespace mac 577 } // namespace mac
587 } // namespace base 578 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698