OLD | NEW |
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 #ifndef BASE_MAC_FOUNDATION_UTIL_H_ | 5 #ifndef BASE_MAC_FOUNDATION_UTIL_H_ |
6 #define BASE_MAC_FOUNDATION_UTIL_H_ | 6 #define BASE_MAC_FOUNDATION_UTIL_H_ |
7 | 7 |
8 #include <CoreFoundation/CoreFoundation.h> | 8 #include <CoreFoundation/CoreFoundation.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #if __LP64__ || NS_BUILD_32_LIKE_64 | 47 #if __LP64__ || NS_BUILD_32_LIKE_64 |
48 typedef CR_FORWARD_ENUM(unsigned long, NSSearchPathDirectory); | 48 typedef CR_FORWARD_ENUM(unsigned long, NSSearchPathDirectory); |
49 typedef unsigned long NSSearchPathDomainMask; | 49 typedef unsigned long NSSearchPathDomainMask; |
50 #else | 50 #else |
51 typedef CR_FORWARD_ENUM(unsigned int, NSSearchPathDirectory); | 51 typedef CR_FORWARD_ENUM(unsigned int, NSSearchPathDirectory); |
52 typedef unsigned int NSSearchPathDomainMask; | 52 typedef unsigned int NSSearchPathDomainMask; |
53 #endif | 53 #endif |
54 | 54 |
55 typedef struct OpaqueSecTrustRef* SecACLRef; | 55 typedef struct OpaqueSecTrustRef* SecACLRef; |
56 typedef struct OpaqueSecTrustedApplicationRef* SecTrustedApplicationRef; | 56 typedef struct OpaqueSecTrustedApplicationRef* SecTrustedApplicationRef; |
| 57 typedef struct OpaqueAXTextMarkerRef* AXTextMarkerRef; |
| 58 typedef struct OpaqueAXTextMarkerRangeRef* AXTextMarkerRangeRef; |
57 | 59 |
58 #if defined(OS_IOS) | 60 #if defined(OS_IOS) |
59 typedef struct CF_BRIDGED_TYPE(id) __SecPolicy* SecPolicyRef; | 61 typedef struct CF_BRIDGED_TYPE(id) __SecPolicy* SecPolicyRef; |
60 #else | 62 #else |
61 typedef struct OpaqueSecPolicyRef* SecPolicyRef; | 63 typedef struct OpaqueSecPolicyRef* SecPolicyRef; |
62 #endif | 64 #endif |
63 | 65 |
64 namespace base { | 66 namespace base { |
65 | 67 |
66 class FilePath; | 68 class FilePath; |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 306 |
305 CF_CAST_DECL(CGColor); | 307 CF_CAST_DECL(CGColor); |
306 | 308 |
307 CF_CAST_DECL(CTFont); | 309 CF_CAST_DECL(CTFont); |
308 CF_CAST_DECL(CTFontDescriptor); | 310 CF_CAST_DECL(CTFontDescriptor); |
309 CF_CAST_DECL(CTRun); | 311 CF_CAST_DECL(CTRun); |
310 | 312 |
311 CF_CAST_DECL(SecACL); | 313 CF_CAST_DECL(SecACL); |
312 CF_CAST_DECL(SecPolicy); | 314 CF_CAST_DECL(SecPolicy); |
313 CF_CAST_DECL(SecTrustedApplication); | 315 CF_CAST_DECL(SecTrustedApplication); |
| 316 CF_CAST_DECL(AXTextMarker); |
| 317 CF_CAST_DECL(AXTextMarkerRange); |
314 | 318 |
315 #undef CF_CAST_DECL | 319 #undef CF_CAST_DECL |
316 | 320 |
317 #if defined(__OBJC__) | 321 #if defined(__OBJC__) |
318 | 322 |
319 // ObjCCast<>() and ObjCCastStrict<>() cast a basic id to a more | 323 // ObjCCast<>() and ObjCCastStrict<>() cast a basic id to a more |
320 // specific (NSObject-derived) type. The compatibility of the passed | 324 // specific (NSObject-derived) type. The compatibility of the passed |
321 // object is found by checking if it's a kind of the requested type | 325 // object is found by checking if it's a kind of the requested type |
322 // identifier. If the supplied object is not compatible with the | 326 // identifier. If the supplied object is not compatible with the |
323 // requested return type, ObjCCast<>() returns nil and | 327 // requested return type, ObjCCast<>() returns nil and |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 // by using the NSToCFCast methods above. | 402 // by using the NSToCFCast methods above. |
399 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo"); | 403 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo"); |
400 // Operator << can not be overloaded for ObjectiveC types as the compiler | 404 // Operator << can not be overloaded for ObjectiveC types as the compiler |
401 // can not distinguish between overloads for id with overloads for void*. | 405 // can not distinguish between overloads for id with overloads for void*. |
402 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, | 406 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, |
403 const CFErrorRef err); | 407 const CFErrorRef err); |
404 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, | 408 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, |
405 const CFStringRef str); | 409 const CFStringRef str); |
406 | 410 |
407 #endif // BASE_MAC_FOUNDATION_UTIL_H_ | 411 #endif // BASE_MAC_FOUNDATION_UTIL_H_ |
OLD | NEW |