Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Unified Diff: content/browser/renderer_host/media/video_capture_manager.cc

Issue 2529493002: mac: Remove more media/base/mac glue unneeded now that we target 10.9 (Closed)
Patch Set: . Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager.h ('k') | media/base/mac/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_manager.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index 8ce5a592c86f08c53164c1cfe74b518f0231e207..e8664c14d0942fce2c45e74683563379256e1dc3 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -45,10 +45,6 @@
#include "content/browser/media/capture/screen_capture_device_android.h"
#endif
-#if defined(OS_MACOSX)
-#include "media/base/mac/avfoundation_glue.h"
-#endif
-
namespace {
// Compares two VideoCaptureFormat by checking smallest frame_size area, then
@@ -301,14 +297,6 @@ void VideoCaptureManager::EnumerateDevices(
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DVLOG(1) << "VideoCaptureManager::EnumerateDevices";
-#if defined(OS_MACOSX)
- if (NeedToInitializeCaptureDeviceApi(MEDIA_DEVICE_VIDEO_CAPTURE)) {
- InitializeCaptureDeviceApiOnUIThread(base::Bind(
- &VideoCaptureManager::EnumerateDevices, this, client_callback));
- return;
- }
-#endif
-
// Bind a callback to ConsolidateDevicesInfoOnDeviceThread() with an argument
// for another callback to OnDevicesInfoEnumerated() to be run in the current
// loop, i.e. IO loop. Pass a timer for UMA histogram collection.
@@ -443,14 +431,6 @@ void VideoCaptureManager::HandleQueuedStartRequest() {
DeviceEntry* const entry = GetDeviceEntryBySerialId(serial_id);
DCHECK(entry);
-#if defined(OS_MACOSX)
- if (NeedToInitializeCaptureDeviceApi(entry->stream_type)) {
- InitializeCaptureDeviceApiOnUIThread(
- base::Bind(&VideoCaptureManager::HandleQueuedStartRequest, this));
- return;
- }
-#endif
-
DVLOG(3) << "HandleQueuedStartRequest, Post start to device thread, device = "
<< entry->id << " start id = " << entry->serial_id;
@@ -1209,32 +1189,6 @@ void VideoCaptureManager::DoTakePhoto(
base::Unretained(device), base::Passed(&callback)));
}
-#if defined(OS_MACOSX)
-void VideoCaptureManager::OnDeviceLayerInitialized(
- const base::Closure& and_then) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- capture_device_api_initialized_ = true;
- and_then.Run();
-}
-
-bool VideoCaptureManager::NeedToInitializeCaptureDeviceApi(
- MediaStreamType stream_type) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- return !capture_device_api_initialized_ &&
- stream_type == MEDIA_DEVICE_VIDEO_CAPTURE;
-}
-
-void VideoCaptureManager::InitializeCaptureDeviceApiOnUIThread(
- const base::Closure& and_then) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- BrowserThread::PostTaskAndReply(
- BrowserThread::UI, FROM_HERE,
- base::Bind(&AVFoundationGlue::InitializeAVFoundation),
- base::Bind(&VideoCaptureManager::OnDeviceLayerInitialized, this,
- and_then));
-}
-#endif
-
#if defined(OS_ANDROID)
void VideoCaptureManager::OnApplicationStateChange(
base::android::ApplicationState state) {
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager.h ('k') | media/base/mac/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698