Chromium Code Reviews| 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 // This file contains forward declarations for items in later SDKs than the | 5 // This file contains forward declarations for items in later SDKs than the |
| 6 // default one with which Chromium is built (currently 10.6). | 6 // default one with which Chromium is built (currently 10.6). |
| 7 // If you call any function from this header, be sure to check at runtime for | 7 // If you call any function from this header, be sure to check at runtime for |
| 8 // respondsToSelector: before calling these functions (else your code will crash | 8 // respondsToSelector: before calling these functions (else your code will crash |
| 9 // on older OS X versions that chrome still supports). | 9 // on older OS X versions that chrome still supports). |
| 10 | 10 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 266 | 266 |
| 267 @property (readonly, copy) NSString* activityType; | 267 @property (readonly, copy) NSString* activityType; |
| 268 @property (copy) NSURL* webPageURL; | 268 @property (copy) NSURL* webPageURL; |
| 269 | 269 |
| 270 @end | 270 @end |
| 271 | 271 |
| 272 BASE_EXPORT extern "C" NSString* const NSUserActivityTypeBrowsingWeb; | 272 BASE_EXPORT extern "C" NSString* const NSUserActivityTypeBrowsingWeb; |
| 273 | 273 |
| 274 #endif // MAC_OS_X_VERSION_10_10 | 274 #endif // MAC_OS_X_VERSION_10_10 |
| 275 | 275 |
| 276 // 10.6 SDK don't have CWSecurity while 10.9 SDK don't have CWSecurityMode, to | |
| 277 // build with SDKs from 10.6 to 10.9 we need to forward declare both and do | |
|
mef
2014/09/04 15:31:34
nit: I don't think we use 'we' in comments. :)
Jiang Jiang
2014/09/04 16:04:21
Done.
| |
| 278 // runtime checks to ensure we use correct methods on different OS X versions. | |
| 279 #if !defined(MAC_OS_X_VERSION_10_9) || \ | |
| 280 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9 | |
| 281 | |
| 282 enum { | |
| 283 kCWSecurityNone = 0, | |
| 284 kCWSecurityWEP = 1, | |
| 285 kCWSecurityWPAPersonal = 2, | |
| 286 kCWSecurityWPAPersonalMixed = 3, | |
| 287 kCWSecurityWPA2Personal = 4, | |
| 288 kCWSecurityPersonal = 5, | |
| 289 kCWSecurityDynamicWEP = 6, | |
| 290 kCWSecurityWPAEnterprise = 7, | |
| 291 kCWSecurityWPAEnterpriseMixed = 8, | |
| 292 kCWSecurityWPA2Enterprise = 9, | |
| 293 kCWSecurityEnterprise = 10, | |
| 294 kCWSecurityUnknown = NSIntegerMax, | |
| 295 }; | |
| 296 | |
| 297 typedef NSInteger CWSecurity; | |
| 298 | |
| 299 @interface CWNetwork (ForwardDeclarations) | |
| 300 @property(readonly) NSInteger rssiValue; | |
| 301 - (BOOL)supportsSecurity:(CWSecurity)security; | |
| 302 @end | |
| 303 | |
| 304 #else | |
| 305 | |
| 306 typedef enum { | |
| 307 kCWSecurityModeOpen = 0, | |
| 308 kCWSecurityModeWEP, | |
| 309 kCWSecurityModeWPA_PSK, | |
| 310 kCWSecurityModeWPA2_PSK, | |
| 311 kCWSecurityModeWPA_Enterprise, | |
| 312 kCWSecurityModeWPA2_Enterprise, | |
| 313 kCWSecurityModeWPS, | |
| 314 kCWSecurityModeDynamicWEP | |
| 315 } CWSecurityMode; | |
| 316 | |
| 317 @interface CWNetwork (ForwardDeclarations) | |
| 318 @property(readonly) NSNumber* rssi; | |
| 319 @property(readonly) NSNumber* securityMode; | |
| 320 @end | |
| 321 | |
| 322 #endif // MAC_OS_X_VERSION_10_9 | |
| 323 | |
| 276 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ | 324 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
| OLD | NEW |