Commit 3e2c5b11 authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Remove unneeded Mac SDK forward declaration.

BUG=1044828

Change-Id: Ia2755553d937c547e458f3a7bb424485ce1b0ff5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2020183Reviewed-by: default avatarLeonard Grey <lgrey@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735977}
parent 798bba05
...@@ -13,40 +13,78 @@ ...@@ -13,40 +13,78 @@
#import <AppKit/AppKit.h> #import <AppKit/AppKit.h>
#include <AvailabilityMacros.h> #include <AvailabilityMacros.h>
#import <CoreBluetooth/CoreBluetooth.h> #include <os/availability.h>
#import <CoreWLAN/CoreWLAN.h>
#import <IOBluetooth/IOBluetooth.h> // NOTE: If an #import is needed only for a newer SDK, it might be found below.
#import <ImageCaptureCore/ImageCaptureCore.h>
#import <QuartzCore/QuartzCore.h>
#include <stdint.h>
#include "base/base_export.h" #include "base/base_export.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Define typedefs, enums, and protocols not available in the version of the // Old symbols that used to be in the macOS SDK but are no longer.
// OSX SDK being compiled against.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// kCWSSIDDidChangeNotification is available in the CoreWLAN.framework for OSX
// versions 10.6 through 10.10 but stopped being included starting with the 10.9
// SDK. Remove when 10.10 is no longer supported by Chromium.
BASE_EXPORT extern "C" NSString* const kCWSSIDDidChangeNotification;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Define NSStrings only available in newer versions of the OSX SDK to force // Definitions from SDKs newer than the one that Chromium compiles against.
// them to be statically linked. //
// HOW TO DO THIS:
//
// 1. In this file:
// a. Use an #if !defined() guard
// b. Include all API_AVAILABLE/NS_CLASS_AVAILABLE_MAC annotations
// c. Optionally import frameworks
// 2. In your source file:
// a. Correctly use @available to annotate availability
//
// This way, when the SDK is rolled, the section full of definitions
// corresponding to it can be easily deleted.
//
// EXAMPLES OF HOW TO DO THIS:
//
// Suppose there's a simple extension of NSApplication in macOS 10.25. Then:
//
// #if !defined(MAC_OS_X_VERSION_10_25) || \
// MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_25
//
// @interface NSApplication (MacOSHouseCatSDK)
// @property(readonly) CGFloat purrRate API_AVAILABLE(macos(10.25));
// @end
//
// #endif // MAC_OS_X_VERSION_10_25
//
//
// Suppose the CoreShoelace framework is introduced in macOS 10.77. Then:
//
// #if !defined(MAC_OS_X_VERSION_10_77) || \
// MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_77
//
// API_AVAILABLE(macos(10.77))
// @interface NSCoreShoelace : NSObject
// @property (readonly) NSUInteger stringLength;
// @end
//
// #else
//
// #import <CoreShoelace/CoreShoelace.h>
//
// #endif // MAC_OS_X_VERSION_10_77
//
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
extern "C" {
#if !defined(MAC_OS_X_VERSION_10_11) || \
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11
BASE_EXPORT extern NSString* const CIDetectorTypeText;
#endif // MAC_OS_X_VERSION_10_11
} // extern "C"
#if !defined(MAC_OS_X_VERSION_10_15) || \ #if !defined(MAC_OS_X_VERSION_10_15) || \
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_15
@interface NSScreen (ForwardDeclare) @interface NSScreen (ForwardDeclare)
@property(readonly) @property(readonly)
CGFloat maximumPotentialExtendedDynamicRangeColorComponentValue; CGFloat maximumPotentialExtendedDynamicRangeColorComponentValue
API_AVAILABLE(macos(10.15));
@end @end
NS_CLASS_AVAILABLE_MAC(10_15)
@interface SFUniversalLink : NSObject @interface SFUniversalLink : NSObject
- (instancetype)initWithWebpageURL:(NSURL*)url; - (instancetype)initWithWebpageURL:(NSURL*)url;
@property(readonly) NSURL* webpageURL; @property(readonly) NSURL* webpageURL;
...@@ -54,14 +92,11 @@ BASE_EXPORT extern NSString* const CIDetectorTypeText; ...@@ -54,14 +92,11 @@ BASE_EXPORT extern NSString* const CIDetectorTypeText;
@property(getter=isEnabled) BOOL enabled; @property(getter=isEnabled) BOOL enabled;
@end @end
#else
#import <SafariServices/SafariServices.h>
#endif // MAC_OS_X_VERSION_10_15 #endif // MAC_OS_X_VERSION_10_15
// ----------------------------------------------------------------------------
// The symbol for kCWSSIDDidChangeNotification is available in the
// CoreWLAN.framework for OSX versions 10.6 through 10.10. The symbol is not
// declared in the OSX 10.9+ SDK, so when compiling against an OSX 10.9+ SDK,
// declare the symbol.
// ----------------------------------------------------------------------------
BASE_EXPORT extern "C" NSString* const kCWSSIDDidChangeNotification;
#endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_ #endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "base/mac/sdk_forward_declarations.h" #include "base/mac/sdk_forward_declarations.h"
#if !defined(MAC_OS_X_VERSION_10_11) || \ // ----------------------------------------------------------------------------
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11 // This file is reserved for the definition of any constant values declared in
NSString* const CIDetectorTypeText = @"CIDetectorTypeText"; // sdk_forward_declarations.h.
#endif // MAC_OS_X_VERSION_10_11 // ----------------------------------------------------------------------------
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment