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

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

Issue 555163002: Fix SDK forward declarations after CL 530193004 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with existing CWNetwork forward declare 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 | no next file » | no next file with comments »
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 enum CWChannelBand { 145 enum CWChannelBand {
146 kCWChannelBandUnknown = 0, 146 kCWChannelBandUnknown = 0,
147 kCWChannelBand2GHz = 1, 147 kCWChannelBand2GHz = 1,
148 kCWChannelBand5GHz = 2, 148 kCWChannelBand5GHz = 2,
149 }; 149 };
150 150
151 @interface CWChannel : NSObject 151 @interface CWChannel : NSObject
152 @property(readonly) CWChannelBand channelBand; 152 @property(readonly) CWChannelBand channelBand;
153 @end 153 @end
154 154
155 enum {
156 kCWSecurityNone = 0,
157 kCWSecurityWEP = 1,
158 kCWSecurityWPAPersonal = 2,
159 kCWSecurityWPAPersonalMixed = 3,
160 kCWSecurityWPA2Personal = 4,
161 kCWSecurityPersonal = 5,
162 kCWSecurityDynamicWEP = 6,
163 kCWSecurityWPAEnterprise = 7,
164 kCWSecurityWPAEnterpriseMixed = 8,
165 kCWSecurityWPA2Enterprise = 9,
166 kCWSecurityEnterprise = 10,
167 kCWSecurityUnknown = NSIntegerMax,
168 };
169
170 typedef NSInteger CWSecurity;
171
155 @interface CWNetwork (LionSDK) 172 @interface CWNetwork (LionSDK)
156 @property(readonly) CWChannel* wlanChannel; 173 @property(readonly) CWChannel* wlanChannel;
174 @property(readonly) NSInteger rssiValue;
175 - (BOOL)supportsSecurity:(CWSecurity)security;
157 @end 176 @end
158 177
159 @interface IOBluetoothHostController (LionSDK) 178 @interface IOBluetoothHostController (LionSDK)
160 - (NSString*)nameAsString; 179 - (NSString*)nameAsString;
161 - (BluetoothHCIPowerState)powerState; 180 - (BluetoothHCIPowerState)powerState;
162 @end 181 @end
163 182
164 enum { 183 enum {
165 kBluetoothFeatureLESupportedController = (1 << 6L), 184 kBluetoothFeatureLESupportedController = (1 << 6L),
166 }; 185 };
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 269
251 enum { 270 enum {
252 NSWindowOcclusionStateVisible = 1UL << 1, 271 NSWindowOcclusionStateVisible = 1UL << 1,
253 }; 272 };
254 typedef NSUInteger NSWindowOcclusionState; 273 typedef NSUInteger NSWindowOcclusionState;
255 274
256 @interface NSWindow (MavericksSDK) 275 @interface NSWindow (MavericksSDK)
257 - (NSWindowOcclusionState)occlusionState; 276 - (NSWindowOcclusionState)occlusionState;
258 @end 277 @end
259 278
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 // !MAC_OS_X_VERSION_10_9 279 #else // !MAC_OS_X_VERSION_10_9
286 280
287 typedef enum { 281 typedef enum {
288 kCWSecurityModeOpen = 0, 282 kCWSecurityModeOpen = 0,
289 kCWSecurityModeWEP, 283 kCWSecurityModeWEP,
290 kCWSecurityModeWPA_PSK, 284 kCWSecurityModeWPA_PSK,
291 kCWSecurityModeWPA2_PSK, 285 kCWSecurityModeWPA2_PSK,
292 kCWSecurityModeWPA_Enterprise, 286 kCWSecurityModeWPA_Enterprise,
293 kCWSecurityModeWPA2_Enterprise, 287 kCWSecurityModeWPA2_Enterprise,
294 kCWSecurityModeWPS, 288 kCWSecurityModeWPS,
(...skipping 17 matching lines...) Expand all
312 @property (readonly, copy) NSString* activityType; 306 @property (readonly, copy) NSString* activityType;
313 @property (copy) NSURL* webPageURL; 307 @property (copy) NSURL* webPageURL;
314 308
315 @end 309 @end
316 310
317 BASE_EXPORT extern "C" NSString* const NSUserActivityTypeBrowsingWeb; 311 BASE_EXPORT extern "C" NSString* const NSUserActivityTypeBrowsingWeb;
318 312
319 #endif // MAC_OS_X_VERSION_10_10 313 #endif // MAC_OS_X_VERSION_10_10
320 314
321 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ 315 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698