#include "content/browser/video_capture_service_impl.h"
#include "base/no_destructor.h"
#include "base/task/thread_pool.h"
#include "base/threading/sequence_local_storage_slot.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_host.h"
#include "content/public/browser/service_process_host.h"
#include "content/public/browser/service_process_host_passkeys.h"
#include "content/public/browser/video_capture_service.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/video_capture/public/mojom/video_capture_service.mojom.h"
#include "services/video_capture/video_capture_service_impl.h"
#if BUILDFLAG(IS_WIN)
#define CREATE_IN_PROCESS_TASK_RUNNER …
#else
#define CREATE_IN_PROCESS_TASK_RUNNER …
#endif
namespace content {
namespace {
std::atomic<bool> g_use_safe_mode(false);
}
class VideoCaptureServiceLauncher { … };
namespace {
video_capture::mojom::VideoCaptureService* g_service_override = …;
void BindInProcessInstance(
mojo::PendingReceiver<video_capture::mojom::VideoCaptureService> receiver) { … }
mojo::Remote<video_capture::mojom::VideoCaptureService>& GetUIThreadRemote() { … }
struct ForwardingImplRefTraits { … };
void BindProxyRemoteOnUIThread(
mojo::PendingReceiver<video_capture::mojom::VideoCaptureService> receiver) { … }
}
void EnableVideoCaptureServiceSafeMode() { … }
video_capture::mojom::VideoCaptureService& GetVideoCaptureService() { … }
void OverrideVideoCaptureServiceForTesting(
video_capture::mojom::VideoCaptureService* service) { … }
}