summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2015-01-22 16:48:22 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-06-23 14:38:29 +0000
commitb5236ac740738d2dd37f0b95dfbf5cda4f2fceeb (patch)
tree00499ac1cd017ebe17c40ebb9d1d18cb44e16ee5
parentf163ed116c6add0946d3fa8f012524a2b6e1c0d8 (diff)
downloadqtwebengine-chromium-b5236ac740738d2dd37f0b95dfbf5cda4f2fceeb.tar.gz
<chromium> Remove the runtime dependency to QTKit
This always forces AVFoundation for QtWebEngine since we don't support OSX < 10.7 and the QTKit dependency prevents submitting applications using QtWebEngine to the Mac App Store. Task-number: QTBUG-43219 Change-Id: I835b594b2d2c0f6db1cf88072a7830ace215daf0 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com> Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
-rw-r--r--chromium/content/browser/device_monitor_mac.mm6
-rw-r--r--chromium/media/base/mac/avfoundation_glue.mm3
-rw-r--r--chromium/media/media.gyp3
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_factory_mac.mm6
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_mac.mm4
5 files changed, 19 insertions, 3 deletions
diff --git a/chromium/content/browser/device_monitor_mac.mm b/chromium/content/browser/device_monitor_mac.mm
index c3c713c5714..9b44abf6eb1 100644
--- a/chromium/content/browser/device_monitor_mac.mm
+++ b/chromium/content/browser/device_monitor_mac.mm
@@ -4,7 +4,9 @@
#include "content/browser/device_monitor_mac.h"
+#ifndef TOOLKIT_QT
#import <QTKit/QTKit.h>
+#endif
#include <set>
@@ -134,6 +136,7 @@ void DeviceMonitorMacImpl::ConsolidateDevicesListAndNotify(
monitor_->NotifyDeviceChanged(base::SystemMonitor::DEVTYPE_AUDIO_CAPTURE);
}
+#ifndef TOOLKIT_QT
class QTKitMonitorImpl : public DeviceMonitorMacImpl {
public:
explicit QTKitMonitorImpl(content::DeviceMonitorMac* monitor);
@@ -213,6 +216,7 @@ void QTKitMonitorImpl::OnDeviceChanged() {
}
ConsolidateDevicesListAndNotify(snapshot_devices);
}
+#endif
// Forward declaration for use by CrAVFoundationDeviceObserver.
class SuspendObserverDelegate;
@@ -540,6 +544,7 @@ void DeviceMonitorMac::StartMonitoring(
DVLOG(1) << "Monitoring via AVFoundation";
device_monitor_impl_.reset(new AVFoundationMonitorImpl(this,
device_task_runner));
+#ifndef TOOLKIT_QT
} else {
// TODO(erikchen): Remove ScopedTracker below once http://crbug.com/458404
// is fixed.
@@ -548,6 +553,7 @@ void DeviceMonitorMac::StartMonitoring(
"458404 DeviceMonitorMac::StartMonitoring::QTKit"));
DVLOG(1) << "Monitoring via QTKit";
device_monitor_impl_.reset(new QTKitMonitorImpl(this));
+#endif
}
}
diff --git a/chromium/media/base/mac/avfoundation_glue.mm b/chromium/media/base/mac/avfoundation_glue.mm
index aed571d5d47..c8181005070 100644
--- a/chromium/media/base/mac/avfoundation_glue.mm
+++ b/chromium/media/base/mac/avfoundation_glue.mm
@@ -134,10 +134,13 @@ bool LoadAVFoundationInternal() {
return false;
}
+#ifndef TOOLKIT_QT
if (!command_line->HasSwitch(switches::kEnableAVFoundation)) {
LogCaptureApi(CAPTURE_API_QTKIT_DUE_TO_NO_FLAG);
return false;
}
+#endif
+
const bool ret = [AVFoundationGlue::AVFoundationBundle() load];
LogCaptureApi(ret ? CAPTURE_API_AVFOUNDATION_LOADED_OK
: CAPTURE_API_QTKIT_DUE_TO_AVFOUNDATION_LOAD_ERROR);
diff --git a/chromium/media/media.gyp b/chromium/media/media.gyp
index ed6aa6698b6..92db1be4865 100644
--- a/chromium/media/media.gyp
+++ b/chromium/media/media.gyp
@@ -560,8 +560,6 @@
'video/capture/mac/video_capture_device_factory_mac.mm',
'video/capture/mac/video_capture_device_mac.h',
'video/capture/mac/video_capture_device_mac.mm',
- 'video/capture/mac/video_capture_device_qtkit_mac.h',
- 'video/capture/mac/video_capture_device_qtkit_mac.mm',
'video/capture/video_capture_device.cc',
'video/capture/video_capture_device.h',
'video/capture/video_capture_device_factory.cc',
@@ -933,7 +931,6 @@
'$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
- '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
],
},
}],
diff --git a/chromium/media/video/capture/mac/video_capture_device_factory_mac.mm b/chromium/media/video/capture/mac/video_capture_device_factory_mac.mm
index 79863463ca1..086cecbc817 100644
--- a/chromium/media/video/capture/mac/video_capture_device_factory_mac.mm
+++ b/chromium/media/video/capture/mac/video_capture_device_factory_mac.mm
@@ -15,7 +15,9 @@
#import "media/video/capture/mac/video_capture_device_avfoundation_mac.h"
#include "media/video/capture/mac/video_capture_device_mac.h"
#import "media/video/capture/mac/video_capture_device_decklink_mac.h"
+#ifndef TOOLKIT_QT
#import "media/video/capture/mac/video_capture_device_qtkit_mac.h"
+#endif
namespace media {
@@ -43,6 +45,7 @@ static bool IsDeviceBlacklisted(const VideoCaptureDevice::Name& name) {
return is_device_blacklisted;
}
+#ifndef TOOLKIT_QT
static scoped_ptr<media::VideoCaptureDevice::Names>
EnumerateDevicesUsingQTKit() {
// TODO(erikchen): Remove ScopedTracker below once http://crbug.com/458397 is
@@ -66,6 +69,7 @@ EnumerateDevicesUsingQTKit() {
}
return device_names.Pass();
}
+#endif
static void RunDevicesEnumeratedCallback(
const base::Callback<void(scoped_ptr<media::VideoCaptureDevice::Names>)>&
@@ -159,11 +163,13 @@ void VideoCaptureDeviceFactoryMac::EnumerateDeviceNames(const base::Callback<
new VideoCaptureDevice::Names());
GetDeviceNames(device_names.get());
callback.Run(device_names.Pass());
+#ifndef TOOLKIT_QT
} else {
DVLOG(1) << "Enumerating video capture devices using QTKit";
base::PostTaskAndReplyWithResult(ui_task_runner_.get(), FROM_HERE,
base::Bind(&EnumerateDevicesUsingQTKit),
base::Bind(&RunDevicesEnumeratedCallback, callback));
+#endif
}
}
diff --git a/chromium/media/video/capture/mac/video_capture_device_mac.mm b/chromium/media/video/capture/mac/video_capture_device_mac.mm
index 521a11178dd..81a9e95d7e5 100644
--- a/chromium/media/video/capture/mac/video_capture_device_mac.mm
+++ b/chromium/media/video/capture/mac/video_capture_device_mac.mm
@@ -20,7 +20,9 @@
#import "media/base/mac/avfoundation_glue.h"
#import "media/video/capture/mac/platform_video_capturing_mac.h"
#import "media/video/capture/mac/video_capture_device_avfoundation_mac.h"
+#ifndef TOOLKIT_QT
#import "media/video/capture/mac/video_capture_device_qtkit_mac.h"
+#endif
#include "ui/gfx/geometry/size.h"
@implementation DeviceNameAndTransportType
@@ -453,9 +455,11 @@ bool VideoCaptureDeviceMac::Init(
if (capture_api_type == Name::AVFOUNDATION) {
capture_device_ =
[[VideoCaptureDeviceAVFoundation alloc] initWithFrameReceiver:this];
+#ifndef TOOLKIT_QT
} else {
capture_device_ =
[[VideoCaptureDeviceQTKit alloc] initWithFrameReceiver:this];
+#endif
}
if (!capture_device_)