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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 BASE_EXPORT extern "C" NSString* const NSWindowDidEnterFullScreenNotification; | 212 BASE_EXPORT extern "C" NSString* const NSWindowDidEnterFullScreenNotification; |
213 BASE_EXPORT extern "C" NSString* const NSWindowDidExitFullScreenNotification; | 213 BASE_EXPORT extern "C" NSString* const NSWindowDidExitFullScreenNotification; |
214 BASE_EXPORT extern "C" NSString* const | 214 BASE_EXPORT extern "C" NSString* const |
215 NSWindowDidChangeBackingPropertiesNotification; | 215 NSWindowDidChangeBackingPropertiesNotification; |
216 | 216 |
217 @protocol NSWindowDelegateFullScreenAdditions | 217 @protocol NSWindowDelegateFullScreenAdditions |
218 - (void)windowDidFailToEnterFullScreen:(NSWindow*)window; | 218 - (void)windowDidFailToEnterFullScreen:(NSWindow*)window; |
219 - (void)windowDidFailToExitFullScreen:(NSWindow*)window; | 219 - (void)windowDidFailToExitFullScreen:(NSWindow*)window; |
220 @end | 220 @end |
221 | 221 |
| 222 BASE_EXPORT extern "C" NSString* const CBAdvertisementDataServiceDataKey; |
| 223 |
| 224 enum { |
| 225 CBPeripheralStateDisconnected = 0, |
| 226 CBPeripheralStateConnecting, |
| 227 CBPeripheralStateConnected, |
| 228 }; |
| 229 typedef NSInteger CBPeripheralState; |
| 230 |
| 231 @interface CBPeripheral : NSObject |
| 232 @property(readonly, nonatomic) CFUUIDRef UUID; |
| 233 @property(retain, readonly) NSString* name; |
| 234 @property(readonly) BOOL isConnected; |
| 235 @end |
| 236 |
| 237 enum { |
| 238 CBCentralManagerStateUnknown = 0, |
| 239 CBCentralManagerStateResetting, |
| 240 CBCentralManagerStateUnsupported, |
| 241 CBCentralManagerStateUnauthorized, |
| 242 CBCentralManagerStatePoweredOff, |
| 243 CBCentralManagerStatePoweredOn, |
| 244 }; |
| 245 typedef NSInteger CBCentralManagerState; |
| 246 |
| 247 @protocol CBCentralManagerDelegate; |
| 248 |
| 249 @interface CBCentralManager : NSObject |
| 250 @property(readonly) CBCentralManagerState state; |
| 251 - (id)initWithDelegate:(id<CBCentralManagerDelegate>)delegate |
| 252 queue:(dispatch_queue_t)queue; |
| 253 - (void)scanForPeripheralsWithServices:(NSArray*)serviceUUIDs |
| 254 options:(NSDictionary*)options; |
| 255 - (void)stopScan; |
| 256 @end |
| 257 |
| 258 @protocol CBCentralManagerDelegate<NSObject> |
| 259 - (void)centralManagerDidUpdateState:(CBCentralManager*)central; |
| 260 - (void)centralManager:(CBCentralManager*)central |
| 261 didDiscoverPeripheral:(CBPeripheral*)peripheral |
| 262 advertisementData:(NSDictionary*)advertisementData |
| 263 RSSI:(NSNumber*)RSSI; |
| 264 @end |
| 265 |
| 266 @interface CBUUID : NSObject |
| 267 @property(nonatomic, readonly) NSData* data; |
| 268 + (CBUUID*)UUIDWithString:(NSString*)theString; |
| 269 @end |
| 270 |
222 #endif // MAC_OS_X_VERSION_10_7 | 271 #endif // MAC_OS_X_VERSION_10_7 |
223 | 272 |
224 #if !defined(MAC_OS_X_VERSION_10_8) || \ | 273 #if !defined(MAC_OS_X_VERSION_10_8) || \ |
225 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 | 274 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 |
226 | 275 |
227 enum { | 276 enum { |
228 NSEventPhaseMayBegin = 0x1 << 5 | 277 NSEventPhaseMayBegin = 0x1 << 5 |
229 }; | 278 }; |
230 | 279 |
231 @interface NSColor (MountainLionSDK) | 280 @interface NSColor (MountainLionSDK) |
232 - (CGColorRef)CGColor; | 281 - (CGColorRef)CGColor; |
233 @end | 282 @end |
234 | 283 |
| 284 @interface NSUUID : NSObject |
| 285 - (NSString*)UUIDString; |
| 286 @end |
| 287 |
235 #endif // MAC_OS_X_VERSION_10_8 | 288 #endif // MAC_OS_X_VERSION_10_8 |
236 | 289 |
237 | 290 |
238 #if !defined(MAC_OS_X_VERSION_10_9) || \ | 291 #if !defined(MAC_OS_X_VERSION_10_9) || \ |
239 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9 | 292 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9 |
240 | 293 |
241 // NSProgress is public API in 10.9, but a version of it exists and is usable | 294 // NSProgress is public API in 10.9, but a version of it exists and is usable |
242 // in 10.8. | 295 // in 10.8. |
243 | 296 |
244 @interface NSProgress : NSObject | 297 @interface NSProgress : NSObject |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 @end | 350 @end |
298 | 351 |
299 | 352 |
300 BASE_EXPORT extern "C" NSString* const | 353 BASE_EXPORT extern "C" NSString* const |
301 NSWindowDidChangeOcclusionStateNotification; | 354 NSWindowDidChangeOcclusionStateNotification; |
302 | 355 |
303 enum { | 356 enum { |
304 NSWorkspaceLaunchWithErrorPresentation = 0x00000040 | 357 NSWorkspaceLaunchWithErrorPresentation = 0x00000040 |
305 }; | 358 }; |
306 | 359 |
| 360 @interface CBPeripheral (MavericksSDK) |
| 361 @property(readonly, nonatomic) NSUUID* identifier; |
| 362 @end |
| 363 |
| 364 BASE_EXPORT extern "C" NSString* const CBAdvertisementDataIsConnectable; |
| 365 |
307 #else // !MAC_OS_X_VERSION_10_9 | 366 #else // !MAC_OS_X_VERSION_10_9 |
308 | 367 |
309 typedef enum { | 368 typedef enum { |
310 kCWSecurityModeOpen = 0, | 369 kCWSecurityModeOpen = 0, |
311 kCWSecurityModeWEP, | 370 kCWSecurityModeWEP, |
312 kCWSecurityModeWPA_PSK, | 371 kCWSecurityModeWPA_PSK, |
313 kCWSecurityModeWPA2_PSK, | 372 kCWSecurityModeWPA2_PSK, |
314 kCWSecurityModeWPA_Enterprise, | 373 kCWSecurityModeWPA_Enterprise, |
315 kCWSecurityModeWPA2_Enterprise, | 374 kCWSecurityModeWPA2_Enterprise, |
316 kCWSecurityModeWPS, | 375 kCWSecurityModeWPS, |
(...skipping 21 matching lines...) Expand all Loading... |
338 - (instancetype)initWithActivityType:(NSString*)activityType; | 397 - (instancetype)initWithActivityType:(NSString*)activityType; |
339 - (void)becomeCurrent; | 398 - (void)becomeCurrent; |
340 - (void)invalidate; | 399 - (void)invalidate; |
341 | 400 |
342 @end | 401 @end |
343 | 402 |
344 BASE_EXPORT extern "C" NSString* const NSUserActivityTypeBrowsingWeb; | 403 BASE_EXPORT extern "C" NSString* const NSUserActivityTypeBrowsingWeb; |
345 | 404 |
346 BASE_EXPORT extern "C" NSString* const NSAppearanceNameVibrantDark; | 405 BASE_EXPORT extern "C" NSString* const NSAppearanceNameVibrantDark; |
347 | 406 |
| 407 @interface CBUUID (YosemiteSDK) |
| 408 - (NSString*)UUIDString; |
| 409 @end |
| 410 |
348 #endif // MAC_OS_X_VERSION_10_10 | 411 #endif // MAC_OS_X_VERSION_10_10 |
349 | 412 |
350 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ | 413 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
OLD | NEW |