Commit 2b93b1fb authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Remove 10.9 code.

BUG=840435

Change-Id: I9269e6ff0a063fcad38e74b3b04861b8a2a9694c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1600537
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657756}
parent 34bd406d
...@@ -58,15 +58,11 @@ std::string SysInfo::OperatingSystemVersion() { ...@@ -58,15 +58,11 @@ std::string SysInfo::OperatingSystemVersion() {
void SysInfo::OperatingSystemVersionNumbers(int32_t* major_version, void SysInfo::OperatingSystemVersionNumbers(int32_t* major_version,
int32_t* minor_version, int32_t* minor_version,
int32_t* bugfix_version) { int32_t* bugfix_version) {
if (@available(macOS 10.10, *)) {
NSOperatingSystemVersion version = NSOperatingSystemVersion version =
[[NSProcessInfo processInfo] operatingSystemVersion]; [[NSProcessInfo processInfo] operatingSystemVersion];
*major_version = version.majorVersion; *major_version = version.majorVersion;
*minor_version = version.minorVersion; *minor_version = version.minorVersion;
*bugfix_version = version.patchVersion; *bugfix_version = version.patchVersion;
} else {
NOTREACHED();
}
} }
// static // static
......
...@@ -31,7 +31,6 @@ void SetupAccessibilityDisplayOptionsNotifier() { ...@@ -31,7 +31,6 @@ void SetupAccessibilityDisplayOptionsNotifier() {
// so ensure that we setup the notification on the correct thread. // so ensure that we setup the notification on the correct thread.
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (@available(macOS 10.10, *)) {
// Listen to accessibility display options changing, so that we can update // Listen to accessibility display options changing, so that we can update
// the renderer for the prefers reduced motion settings. // the renderer for the prefers reduced motion settings.
// //
...@@ -49,7 +48,6 @@ void SetupAccessibilityDisplayOptionsNotifier() { ...@@ -49,7 +48,6 @@ void SetupAccessibilityDisplayOptionsNotifier() {
wc->GetRenderViewHost()->OnWebkitPreferencesChanged(); wc->GetRenderViewHost()->OnWebkitPreferencesChanged();
} }
}]; }];
}
} }
} // namespace } // namespace
......
...@@ -101,14 +101,8 @@ base::WeakPtr<BluetoothAdapterMac> BluetoothAdapterMac::CreateAdapterForTest( ...@@ -101,14 +101,8 @@ base::WeakPtr<BluetoothAdapterMac> BluetoothAdapterMac::CreateAdapterForTest(
// static // static
BluetoothUUID BluetoothAdapterMac::BluetoothUUIDWithCBUUID(CBUUID* uuid) { BluetoothUUID BluetoothAdapterMac::BluetoothUUIDWithCBUUID(CBUUID* uuid) {
// UUIDString only available OS X >= 10.10.
if (@available(macOS 10.10, *)) {
std::string uuid_c_string = base::SysNSStringToUTF8([uuid UUIDString]); std::string uuid_c_string = base::SysNSStringToUTF8([uuid UUIDString]);
return device::BluetoothUUID(uuid_c_string); return device::BluetoothUUID(uuid_c_string);
} else {
DCHECK(false);
return {};
}
} }
// static // static
......
...@@ -38,10 +38,7 @@ ACTION_P(RunClosure, closure) { ...@@ -38,10 +38,7 @@ ACTION_P(RunClosure, closure) {
std::unique_ptr<mojom::BarcodeDetection> CreateBarcodeDetectorImplMacCoreImage( std::unique_ptr<mojom::BarcodeDetection> CreateBarcodeDetectorImplMacCoreImage(
mojom::BarcodeDetectorOptionsPtr options) { mojom::BarcodeDetectorOptionsPtr options) {
if (@available(macOS 10.10, *)) {
return std::make_unique<BarcodeDetectionImplMac>(); return std::make_unique<BarcodeDetectionImplMac>();
}
return nullptr;
} }
std::unique_ptr<mojom::BarcodeDetection> CreateBarcodeDetectorImplMacVision( std::unique_ptr<mojom::BarcodeDetection> CreateBarcodeDetectorImplMacVision(
......
...@@ -46,11 +46,8 @@ void BarcodeDetectionProviderMac::CreateBarcodeDetection( ...@@ -46,11 +46,8 @@ void BarcodeDetectionProviderMac::CreateBarcodeDetection(
} }
} }
// CIDetector barcode detection needs at least MAC OS X 10.10.
if (@available(macOS 10.10, *)) {
mojo::MakeStrongBinding(std::make_unique<BarcodeDetectionImplMac>(), mojo::MakeStrongBinding(std::make_unique<BarcodeDetectionImplMac>(),
std::move(request)); std::move(request));
}
} }
void BarcodeDetectionProviderMac::EnumerateSupportedFormats( void BarcodeDetectionProviderMac::EnumerateSupportedFormats(
...@@ -77,17 +74,9 @@ void BarcodeDetectionProviderMac::EnumerateSupportedFormats( ...@@ -77,17 +74,9 @@ void BarcodeDetectionProviderMac::EnumerateSupportedFormats(
return; return;
} }
// Barcode detection needs at least MAC OS X 10.10.
if (@available(macOS 10.10, *)) {
supported_formats_ = std::vector<mojom::BarcodeFormat>( supported_formats_ = std::vector<mojom::BarcodeFormat>(
BarcodeDetectionImplMac::GetSupportedSymbologies()); BarcodeDetectionImplMac::GetSupportedSymbologies());
std::move(callback).Run(supported_formats_.value()); std::move(callback).Run(supported_formats_.value());
return;
}
DLOG(ERROR) << "Platform does not support Barcode Detection.";
supported_formats_.emplace();
std::move(callback).Run({});
} }
} // namespace shape_detection } // namespace shape_detection
...@@ -81,12 +81,10 @@ bool AVSampleBufferDisplayLayerEnqueueCVPixelBuffer( ...@@ -81,12 +81,10 @@ bool AVSampleBufferDisplayLayerEnqueueCVPixelBuffer(
[av_layer enqueueSampleBuffer:sample_buffer]; [av_layer enqueueSampleBuffer:sample_buffer];
if (@available(macOS 10.10, *)) {
AVQueuedSampleBufferRenderingStatus status = [av_layer status]; AVQueuedSampleBufferRenderingStatus status = [av_layer status];
switch (status) { switch (status) {
case AVQueuedSampleBufferRenderingStatusUnknown: case AVQueuedSampleBufferRenderingStatusUnknown:
LOG(ERROR) LOG(ERROR) << "AVSampleBufferDisplayLayer has status unknown, but should "
<< "AVSampleBufferDisplayLayer has status unknown, but should "
"be rendering."; "be rendering.";
return false; return false;
case AVQueuedSampleBufferRenderingStatusFailed: case AVQueuedSampleBufferRenderingStatusFailed:
...@@ -97,7 +95,6 @@ bool AVSampleBufferDisplayLayerEnqueueCVPixelBuffer( ...@@ -97,7 +95,6 @@ bool AVSampleBufferDisplayLayerEnqueueCVPixelBuffer(
case AVQueuedSampleBufferRenderingStatusRendering: case AVQueuedSampleBufferRenderingStatusRendering:
break; break;
} }
}
return true; return true;
} }
......
...@@ -286,7 +286,6 @@ NativeThemeMac::NativeThemeMac() { ...@@ -286,7 +286,6 @@ NativeThemeMac::NativeThemeMac() {
theme->NotifyObservers(); theme->NotifyObservers();
}]); }]);
} }
if (@available(macOS 10.10, *)) {
if (!IsForcedHighContrast()) { if (!IsForcedHighContrast()) {
set_high_contrast(IsHighContrast()); set_high_contrast(IsHighContrast());
__block auto theme = this; __block auto theme = this;
...@@ -301,7 +300,6 @@ NativeThemeMac::NativeThemeMac() { ...@@ -301,7 +300,6 @@ NativeThemeMac::NativeThemeMac() {
theme->NotifyObservers(); theme->NotifyObservers();
}]; }];
} }
}
} }
NativeThemeMac::~NativeThemeMac() { NativeThemeMac::~NativeThemeMac() {
......
...@@ -287,15 +287,14 @@ BridgedNativeWidgetImpl::CreateNSWindow( ...@@ -287,15 +287,14 @@ BridgedNativeWidgetImpl::CreateNSWindow(
defer:NO]); defer:NO]);
break; break;
} }
if (@available(macOS 10.10, *)) {
if (params->titlebar_appears_transparent) if (params->titlebar_appears_transparent)
[ns_window setTitlebarAppearsTransparent:YES]; [ns_window setTitlebarAppearsTransparent:YES];
if (params->window_title_hidden) if (params->window_title_hidden)
[ns_window setTitleVisibility:NSWindowTitleHidden]; [ns_window setTitleVisibility:NSWindowTitleHidden];
}
if (params->animation_enabled) if (params->animation_enabled)
[ns_window setAnimationBehavior:NSWindowAnimationBehaviorDocumentWindow]; [ns_window setAnimationBehavior:NSWindowAnimationBehaviorDocumentWindow];
return ns_window; return ns_window;
} }
......
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