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

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: Remove runtime checking in favor of simpler code 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 enum { 251 enum {
252 NSWindowOcclusionStateVisible = 1UL << 1, 252 NSWindowOcclusionStateVisible = 1UL << 1,
253 }; 253 };
254 typedef NSUInteger NSWindowOcclusionState; 254 typedef NSUInteger NSWindowOcclusionState;
255 255
256 @interface NSWindow (MavericksSDK) 256 @interface NSWindow (MavericksSDK)
257 - (NSWindowOcclusionState)occlusionState; 257 - (NSWindowOcclusionState)occlusionState;
258 @end 258 @end
259 259
260 // 10.6 SDK don't have CWSecurity while 10.9 SDK don't have CWSecurityMode, to
261 // build with SDKs from 10.6 to 10.9 both need to be forward declared and use
262 // runtime checks to ensure correct methods are used on different OS X versions.
263 enum {
264 kCWSecurityNone = 0,
265 kCWSecurityWEP = 1,
266 kCWSecurityWPAPersonal = 2,
267 kCWSecurityWPAPersonalMixed = 3,
268 kCWSecurityWPA2Personal = 4,
269 kCWSecurityPersonal = 5,
270 kCWSecurityDynamicWEP = 6,
271 kCWSecurityWPAEnterprise = 7,
272 kCWSecurityWPAEnterpriseMixed = 8,
273 kCWSecurityWPA2Enterprise = 9,
274 kCWSecurityEnterprise = 10,
275 kCWSecurityUnknown = NSIntegerMax,
276 };
277
278 typedef NSInteger CWSecurity;
279
280 @interface CWNetwork (MavericksSDK)
281 @property(readonly) NSInteger rssiValue;
282 - (BOOL)supportsSecurity:(CWSecurity)security;
283 @end
284
285 #else
Robert Sesek 2014/09/05 18:18:43 // !MAC_OS_X_VERSION_10_9
Jiang Jiang 2014/09/06 06:42:57 Done.
286
287 typedef enum {
288 kCWSecurityModeOpen = 0,
289 kCWSecurityModeWEP,
290 kCWSecurityModeWPA_PSK,
291 kCWSecurityModeWPA2_PSK,
292 kCWSecurityModeWPA_Enterprise,
293 kCWSecurityModeWPA2_Enterprise,
294 kCWSecurityModeWPS,
295 kCWSecurityModeDynamicWEP
296 } CWSecurityMode;
297
298 @interface CWNetwork (SnowLeopardSDK)
299 @property(readonly) NSNumber* rssi;
300 @property(readonly) NSNumber* securityMode;
301 @end
302
303 BASE_EXPORT extern "C" NSString* const kCWSSIDDidChangeNotification;
304
260 #endif // MAC_OS_X_VERSION_10_9 305 #endif // MAC_OS_X_VERSION_10_9
261 306
262 #if !defined(MAC_OS_X_VERSION_10_10) || \ 307 #if !defined(MAC_OS_X_VERSION_10_10) || \
263 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10 308 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10
264 309
265 @interface NSUserActivity : NSObject 310 @interface NSUserActivity : NSObject
266 311
267 @property (readonly, copy) NSString* activityType; 312 @property (readonly, copy) NSString* activityType;
268 @property (copy) NSURL* webPageURL; 313 @property (copy) NSURL* webPageURL;
269 314
270 @end 315 @end
271 316
272 BASE_EXPORT extern "C" NSString* const NSUserActivityTypeBrowsingWeb; 317 BASE_EXPORT extern "C" NSString* const NSUserActivityTypeBrowsingWeb;
273 318
274 #endif // MAC_OS_X_VERSION_10_10 319 #endif // MAC_OS_X_VERSION_10_10
275 320
276 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ 321 #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