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 enum { |
| 223 CBPeripheralStateDisconnected = 0, |
| 224 CBPeripheralStateConnecting, |
| 225 CBPeripheralStateConnected, |
| 226 }; |
| 227 typedef NSInteger CBPeripheralState; |
| 228 |
| 229 @interface CBPeripheral : NSObject |
| 230 @property(readonly, nonatomic) CFUUIDRef UUID; |
| 231 @property(retain, readonly) NSString* name; |
| 232 @property(readonly) BOOL isConnected; |
| 233 @end |
| 234 |
| 235 enum { |
| 236 CBCentralManagerStateUnknown = 0, |
| 237 CBCentralManagerStateResetting, |
| 238 CBCentralManagerStateUnsupported, |
| 239 CBCentralManagerStateUnauthorized, |
| 240 CBCentralManagerStatePoweredOff, |
| 241 CBCentralManagerStatePoweredOn, |
| 242 }; |
| 243 typedef NSInteger CBCentralManagerState; |
| 244 |
| 245 @protocol CBCentralManagerDelegate; |
| 246 |
| 247 @interface CBCentralManager : NSObject |
| 248 @property(readonly) CBCentralManagerState state; |
| 249 - (id)initWithDelegate:(id<CBCentralManagerDelegate>)delegate |
| 250 queue:(dispatch_queue_t)queue; |
| 251 - (void)scanForPeripheralsWithServices:(NSArray*)serviceUUIDs |
| 252 options:(NSDictionary*)options; |
| 253 - (void)stopScan; |
| 254 @end |
| 255 |
| 256 @protocol CBCentralManagerDelegate<NSObject> |
| 257 - (void)centralManagerDidUpdateState:(CBCentralManager*)central; |
| 258 - (void)centralManager:(CBCentralManager*)central |
| 259 didDiscoverPeripheral:(CBPeripheral*)peripheral |
| 260 advertisementData:(NSDictionary*)advertisementData |
| 261 RSSI:(NSNumber*)RSSI; |
| 262 @end |
| 263 |
222 #endif // MAC_OS_X_VERSION_10_7 | 264 #endif // MAC_OS_X_VERSION_10_7 |
223 | 265 |
224 #if !defined(MAC_OS_X_VERSION_10_8) || \ | 266 #if !defined(MAC_OS_X_VERSION_10_8) || \ |
225 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 | 267 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 |
226 | 268 |
227 enum { | 269 enum { |
228 NSEventPhaseMayBegin = 0x1 << 5 | 270 NSEventPhaseMayBegin = 0x1 << 5 |
229 }; | 271 }; |
230 | 272 |
231 @interface NSColor (MountainLionSDK) | 273 @interface NSColor (MountainLionSDK) |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 @end | 339 @end |
298 | 340 |
299 | 341 |
300 BASE_EXPORT extern "C" NSString* const | 342 BASE_EXPORT extern "C" NSString* const |
301 NSWindowDidChangeOcclusionStateNotification; | 343 NSWindowDidChangeOcclusionStateNotification; |
302 | 344 |
303 enum { | 345 enum { |
304 NSWorkspaceLaunchWithErrorPresentation = 0x00000040 | 346 NSWorkspaceLaunchWithErrorPresentation = 0x00000040 |
305 }; | 347 }; |
306 | 348 |
| 349 @interface CBPeripheral (MavericksSDK) |
| 350 @property(readonly, nonatomic) NSUUID* identifier; |
| 351 @end |
| 352 |
307 #else // !MAC_OS_X_VERSION_10_9 | 353 #else // !MAC_OS_X_VERSION_10_9 |
308 | 354 |
309 typedef enum { | 355 typedef enum { |
310 kCWSecurityModeOpen = 0, | 356 kCWSecurityModeOpen = 0, |
311 kCWSecurityModeWEP, | 357 kCWSecurityModeWEP, |
312 kCWSecurityModeWPA_PSK, | 358 kCWSecurityModeWPA_PSK, |
313 kCWSecurityModeWPA2_PSK, | 359 kCWSecurityModeWPA2_PSK, |
314 kCWSecurityModeWPA_Enterprise, | 360 kCWSecurityModeWPA_Enterprise, |
315 kCWSecurityModeWPA2_Enterprise, | 361 kCWSecurityModeWPA2_Enterprise, |
316 kCWSecurityModeWPS, | 362 kCWSecurityModeWPS, |
(...skipping 21 matching lines...) Expand all Loading... |
338 - (instancetype)initWithActivityType:(NSString*)activityType; | 384 - (instancetype)initWithActivityType:(NSString*)activityType; |
339 - (void)becomeCurrent; | 385 - (void)becomeCurrent; |
340 - (void)invalidate; | 386 - (void)invalidate; |
341 | 387 |
342 @end | 388 @end |
343 | 389 |
344 BASE_EXPORT extern "C" NSString* const NSUserActivityTypeBrowsingWeb; | 390 BASE_EXPORT extern "C" NSString* const NSUserActivityTypeBrowsingWeb; |
345 | 391 |
346 BASE_EXPORT extern "C" NSString* const NSAppearanceNameVibrantDark; | 392 BASE_EXPORT extern "C" NSString* const NSAppearanceNameVibrantDark; |
347 | 393 |
| 394 @interface CBUUID (YosemiteSDK) |
| 395 - (NSString*)UUIDString; |
| 396 @end |
| 397 |
348 #endif // MAC_OS_X_VERSION_10_10 | 398 #endif // MAC_OS_X_VERSION_10_10 |
349 | 399 |
350 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ | 400 #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |
OLD | NEW |