diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-07 00:58:52 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-07 00:58:52 +0000 |
commit | 2f301674e584da1a4e6ba03178c29047a01d91bf (patch) | |
tree | d95078a714f0fa9e233491642f42b50dcdc01d50 /base/mac | |
parent | 8dc56d0f6ed6e59c93b20ef0d4cec99e411ed050 (diff) | |
download | chromium_src-2f301674e584da1a4e6ba03178c29047a01d91bf.zip chromium_src-2f301674e584da1a4e6ba03178c29047a01d91bf.tar.gz chromium_src-2f301674e584da1a4e6ba03178c29047a01d91bf.tar.bz2 |
Consolidate SDK forwards in sdk_forward_declarations.h.
BUG=none
TEST=none
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/322623002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275578 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac')
-rw-r--r-- | base/mac/mac_util.mm | 11 | ||||
-rw-r--r-- | base/mac/sdk_forward_declarations.h | 152 |
2 files changed, 152 insertions, 11 deletions
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm index c256599..5f08a44 100644 --- a/base/mac/mac_util.mm +++ b/base/mac/mac_util.mm @@ -20,6 +20,7 @@ #include "base/mac/scoped_cftyperef.h" #include "base/mac/scoped_ioobject.h" #include "base/mac/scoped_nsobject.h" +#include "base/mac/sdk_forward_declarations.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" #include "base/strings/sys_string_conversions.h" @@ -27,16 +28,6 @@ namespace base { namespace mac { -// Replicate specific 10.7 SDK declarations for building with prior SDKs. -#if !defined(MAC_OS_X_VERSION_10_7) || \ - MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 - -enum { - NSApplicationPresentationFullScreen = 1 << 10 -}; - -#endif // MAC_OS_X_VERSION_10_7 - namespace { // The current count of outstanding requests for full screen mode from browser diff --git a/base/mac/sdk_forward_declarations.h b/base/mac/sdk_forward_declarations.h index c72d320..1148e36 100644 --- a/base/mac/sdk_forward_declarations.h +++ b/base/mac/sdk_forward_declarations.h @@ -12,6 +12,11 @@ #define BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ #import <AppKit/AppKit.h> +#import <CoreWLAN/CoreWLAN.h> +#import <ImageCaptureCore/ImageCaptureCore.h> +#import <IOBluetooth/objc/IOBluetoothDevice.h> +#import <IOBluetooth/objc/IOBluetoothDeviceInquiry.h> +#import <IOBluetooth/objc/IOBluetoothHostController.h> #if !defined(MAC_OS_X_VERSION_10_7) || \ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 @@ -27,6 +32,19 @@ enum { typedef NSUInteger NSEventPhase; enum { + NSFullScreenWindowMask = 1 << 14, +}; + +enum { + NSApplicationPresentationFullScreen = 1 << 10, +}; + +enum { + NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7, + NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8, +}; + +enum { NSEventSwipeTrackingLockDirection = 0x1 << 0, NSEventSwipeTrackingClampGestureAmount = 0x1 << 1, }; @@ -41,6 +59,12 @@ enum { }; typedef NSInteger NSWindowAnimationBehavior; +enum { + NSWindowDocumentVersionsButton = 6, + NSWindowFullScreenButton, +}; +typedef NSUInteger NSWindowButton; + @interface NSEvent (LionSDK) + (BOOL)isSwipeTrackingFromScrollEventsEnabled; @@ -60,7 +84,11 @@ typedef NSInteger NSWindowAnimationBehavior; @end -@interface CALayer (LionAPI) +@interface NSApplication (LionSDK) +- (void)disableRelaunchOnLogin; +@end + +@interface CALayer (LionSDK) - (CGFloat)contentsScale; - (void)setContentsScale:(CGFloat)contentsScale; @end @@ -74,6 +102,12 @@ typedef NSInteger NSWindowAnimationBehavior; - (CGFloat)backingScaleFactor; - (NSWindowAnimationBehavior)animationBehavior; - (void)setAnimationBehavior:(NSWindowAnimationBehavior)newAnimationBehavior; +- (void)toggleFullScreen:(id)sender; +- (void)setRestorable:(BOOL)flag; +@end + +@interface NSCursor (LionSDKDeclarations) ++ (NSCursor*)IBeamCursorForVerticalLayout; @end @interface NSAnimationContext (LionSDK) @@ -81,13 +115,129 @@ typedef NSInteger NSWindowAnimationBehavior; completionHandler:(void (^)(void))completionHandler; @end +@interface NSView (LionSDK) +- (NSSize)convertSizeFromBacking:(NSSize)size; +- (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag; +@end + +@interface NSObject (ICCameraDeviceDelegateLionSDK) +- (void)deviceDidBecomeReadyWithCompleteContentCatalog:(ICDevice*)device; +- (void)didDownloadFile:(ICCameraFile*)file + error:(NSError*)error + options:(NSDictionary*)options + contextInfo:(void*)contextInfo; +@end + +@interface NSScroller (LionSDK) ++ (NSInteger)preferredScrollerStyle; +@end + +@interface CWInterface (LionSDK) +- (BOOL)associateToNetwork:(CWNetwork*)network + password:(NSString*)password + error:(NSError**)error; +- (NSSet*)scanForNetworksWithName:(NSString*)networkName + error:(NSError**)error; +@end + +enum CWChannelBand { + kCWChannelBandUnknown = 0, + kCWChannelBand2GHz = 1, + kCWChannelBand5GHz = 2, +}; + +@interface CWChannel : NSObject +@property(readonly) CWChannelBand channelBand; +@end + +@interface CWNetwork (LionSDK) +@property(readonly) CWChannel* wlanChannel; +@end + +@interface IOBluetoothHostController (LionSDK) +- (NSString*)nameAsString; +- (BluetoothHCIPowerState)powerState; +@end + +@protocol IOBluetoothDeviceInquiryDelegate +- (void)deviceInquiryStarted:(IOBluetoothDeviceInquiry*)sender; +- (void)deviceInquiryDeviceFound:(IOBluetoothDeviceInquiry*)sender + device:(IOBluetoothDevice*)device; +- (void)deviceInquiryComplete:(IOBluetoothDeviceInquiry*)sender + error:(IOReturn)error + aborted:(BOOL)aborted; +@end + +@interface IOBluetoothDevice (LionSDK) +- (NSString*)addressString; +- (unsigned int)classOfDevice; +- (BluetoothConnectionHandle)connectionHandle; +- (BluetoothHCIRSSIValue)rawRSSI; +- (NSArray*)services; +- (IOReturn)performSDPQuery:(id)target uuids:(NSArray*)uuids; +@end + #endif // MAC_OS_X_VERSION_10_7 + #if !defined(MAC_OS_X_VERSION_10_8) || \ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 + enum { NSEventPhaseMayBegin = 0x1 << 5 }; + #endif // MAC_OS_X_VERSION_10_8 + +#if !defined(MAC_OS_X_VERSION_10_9) || \ + MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9 + +// NSProgress is public API in 10.9, but a version of it exists and is usable +// in 10.8. + +@interface NSProgress : NSObject + +- (instancetype)initWithParent:(NSProgress*)parentProgressOrNil + userInfo:(NSDictionary*)userInfoOrNil; +@property (copy) NSString* kind; + +@property int64_t totalUnitCount; +@property int64_t completedUnitCount; + +@property (getter=isCancellable) BOOL cancellable; +@property (getter=isPausable) BOOL pausable; +@property (readonly, getter=isCancelled) BOOL cancelled; +@property (readonly, getter=isPaused) BOOL paused; +@property (copy) void (^cancellationHandler)(void); +@property (copy) void (^pausingHandler)(void); +- (void)cancel; +- (void)pause; + +- (void)setUserInfoObject:(id)objectOrNil forKey:(NSString*)key; +- (NSDictionary*)userInfo; + +@property (readonly, getter=isIndeterminate) BOOL indeterminate; +@property (readonly) double fractionCompleted; + +- (void)publish; +- (void)unpublish; + +@end + +@interface NSView (MavericksSDK) +- (void)setCanDrawSubviewsIntoLayer:(BOOL)flag; +@end + +enum { + NSWindowOcclusionStateVisible = 1UL << 1, +}; +typedef NSUInteger NSWindowOcclusionState; + +@interface NSWindow (MavericksSDK) +- (NSWindowOcclusionState)occlusionState; +@end + +#endif // MAC_OS_X_VERSION_10_9 + #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ |