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() {
void SysInfo::OperatingSystemVersionNumbers(int32_t* major_version,
int32_t* minor_version,
int32_t* bugfix_version) {
if (@available(macOS 10.10, *)) {
NSOperatingSystemVersion version =
[[NSProcessInfo processInfo] operatingSystemVersion];
*major_version = version.majorVersion;
*minor_version = version.minorVersion;
*bugfix_version = version.patchVersion;
} else {
NOTREACHED();
}
NSOperatingSystemVersion version =
[[NSProcessInfo processInfo] operatingSystemVersion];
*major_version = version.majorVersion;
*minor_version = version.minorVersion;
*bugfix_version = version.patchVersion;
}
// static
......
......@@ -31,25 +31,23 @@ void SetupAccessibilityDisplayOptionsNotifier() {
// so ensure that we setup the notification on the correct thread.
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (@available(macOS 10.10, *)) {
// Listen to accessibility display options changing, so that we can update
// the renderer for the prefers reduced motion settings.
//
// BrowserAccessibilityStateImpl is a deliberately leaked singleton, so we
// don't need to record the notification token for later cleanup.
[[[NSWorkspace sharedWorkspace] notificationCenter]
addObserverForName:
NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification
object:nil
queue:nil
usingBlock:^(NSNotification* notification) {
gfx::Animation::UpdatePrefersReducedMotion();
for (WebContentsImpl* wc :
WebContentsImpl::GetAllWebContents()) {
wc->GetRenderViewHost()->OnWebkitPreferencesChanged();
}
}];
}
// Listen to accessibility display options changing, so that we can update
// the renderer for the prefers reduced motion settings.
//
// BrowserAccessibilityStateImpl is a deliberately leaked singleton, so we
// don't need to record the notification token for later cleanup.
[[[NSWorkspace sharedWorkspace] notificationCenter]
addObserverForName:
NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification
object:nil
queue:nil
usingBlock:^(NSNotification* notification) {
gfx::Animation::UpdatePrefersReducedMotion();
for (WebContentsImpl* wc :
WebContentsImpl::GetAllWebContents()) {
wc->GetRenderViewHost()->OnWebkitPreferencesChanged();
}
}];
}
} // namespace
......
......@@ -101,14 +101,8 @@ base::WeakPtr<BluetoothAdapterMac> BluetoothAdapterMac::CreateAdapterForTest(
// static
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]);
return device::BluetoothUUID(uuid_c_string);
} else {
DCHECK(false);
return {};
}
std::string uuid_c_string = base::SysNSStringToUTF8([uuid UUIDString]);
return device::BluetoothUUID(uuid_c_string);
}
// static
......
......@@ -38,10 +38,7 @@ ACTION_P(RunClosure, closure) {
std::unique_ptr<mojom::BarcodeDetection> CreateBarcodeDetectorImplMacCoreImage(
mojom::BarcodeDetectorOptionsPtr options) {
if (@available(macOS 10.10, *)) {
return std::make_unique<BarcodeDetectionImplMac>();
}
return nullptr;
return std::make_unique<BarcodeDetectionImplMac>();
}
std::unique_ptr<mojom::BarcodeDetection> CreateBarcodeDetectorImplMacVision(
......
......@@ -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>(),
std::move(request));
}
mojo::MakeStrongBinding(std::make_unique<BarcodeDetectionImplMac>(),
std::move(request));
}
void BarcodeDetectionProviderMac::EnumerateSupportedFormats(
......@@ -77,17 +74,9 @@ void BarcodeDetectionProviderMac::EnumerateSupportedFormats(
return;
}
// Barcode detection needs at least MAC OS X 10.10.
if (@available(macOS 10.10, *)) {
supported_formats_ = std::vector<mojom::BarcodeFormat>(
BarcodeDetectionImplMac::GetSupportedSymbologies());
std::move(callback).Run(supported_formats_.value());
return;
}
DLOG(ERROR) << "Platform does not support Barcode Detection.";
supported_formats_.emplace();
std::move(callback).Run({});
supported_formats_ = std::vector<mojom::BarcodeFormat>(
BarcodeDetectionImplMac::GetSupportedSymbologies());
std::move(callback).Run(supported_formats_.value());
}
} // namespace shape_detection
......@@ -81,22 +81,19 @@ bool AVSampleBufferDisplayLayerEnqueueCVPixelBuffer(
[av_layer enqueueSampleBuffer:sample_buffer];
if (@available(macOS 10.10, *)) {
AVQueuedSampleBufferRenderingStatus status = [av_layer status];
switch (status) {
case AVQueuedSampleBufferRenderingStatusUnknown:
LOG(ERROR)
<< "AVSampleBufferDisplayLayer has status unknown, but should "
"be rendering.";
return false;
case AVQueuedSampleBufferRenderingStatusFailed:
LOG(ERROR) << "AVSampleBufferDisplayLayer has status failed, error: "
<< [[[av_layer error] description]
cStringUsingEncoding:NSUTF8StringEncoding];
return false;
case AVQueuedSampleBufferRenderingStatusRendering:
break;
}
AVQueuedSampleBufferRenderingStatus status = [av_layer status];
switch (status) {
case AVQueuedSampleBufferRenderingStatusUnknown:
LOG(ERROR) << "AVSampleBufferDisplayLayer has status unknown, but should "
"be rendering.";
return false;
case AVQueuedSampleBufferRenderingStatusFailed:
LOG(ERROR) << "AVSampleBufferDisplayLayer has status failed, error: "
<< [[[av_layer error] description]
cStringUsingEncoding:NSUTF8StringEncoding];
return false;
case AVQueuedSampleBufferRenderingStatusRendering:
break;
}
return true;
......
......@@ -286,21 +286,19 @@ NativeThemeMac::NativeThemeMac() {
theme->NotifyObservers();
}]);
}
if (@available(macOS 10.10, *)) {
if (!IsForcedHighContrast()) {
set_high_contrast(IsHighContrast());
__block auto theme = this;
high_contrast_notification_token_ =
[[[NSWorkspace sharedWorkspace] notificationCenter]
addObserverForName:
NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification
object:nil
queue:nil
usingBlock:^(NSNotification* notification) {
theme->set_high_contrast(IsHighContrast());
theme->NotifyObservers();
}];
}
if (!IsForcedHighContrast()) {
set_high_contrast(IsHighContrast());
__block auto theme = this;
high_contrast_notification_token_ =
[[[NSWorkspace sharedWorkspace] notificationCenter]
addObserverForName:
NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification
object:nil
queue:nil
usingBlock:^(NSNotification* notification) {
theme->set_high_contrast(IsHighContrast());
theme->NotifyObservers();
}];
}
}
......
......@@ -287,15 +287,14 @@ BridgedNativeWidgetImpl::CreateNSWindow(
defer:NO]);
break;
}
if (@available(macOS 10.10, *)) {
if (params->titlebar_appears_transparent)
[ns_window setTitlebarAppearsTransparent:YES];
if (params->window_title_hidden)
[ns_window setTitleVisibility:NSWindowTitleHidden];
}
if (params->titlebar_appears_transparent)
[ns_window setTitlebarAppearsTransparent:YES];
if (params->window_title_hidden)
[ns_window setTitleVisibility:NSWindowTitleHidden];
if (params->animation_enabled)
[ns_window setAnimationBehavior:NSWindowAnimationBehaviorDocumentWindow];
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