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

Side by Side Diff: base/mac/sdk_forward_declarations.h

Issue 530193004: Fix wifi_component build with 10.9+ SDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing comment after #endif Created 6 years, 3 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 | « no previous file | components/wifi/wifi_service_mac.mm » ('j') | components/wifi/wifi_service_mac.mm » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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
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_
OLDNEW
« no previous file with comments | « no previous file | components/wifi/wifi_service_mac.mm » ('j') | components/wifi/wifi_service_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698