mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-07 15:48:41 +01:00
macOS: Create a CFRunLoop for video-capture and audio services (issue #2573)
This commit is contained in:
parent
7ecc5d31ea
commit
e94b3e2478
@ -113,6 +113,11 @@
|
||||
#include "content/public/common/content_descriptors.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
#include "services/audio/public/mojom/constants.mojom.h"
|
||||
#include "services/video_capture/public/mojom/constants.mojom.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "sandbox/win/src/sandbox_policy.h"
|
||||
#endif
|
||||
@ -776,6 +781,19 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
}
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::AdjustUtilityServiceProcessCommandLine(
|
||||
const service_manager::Identity& identity,
|
||||
base::CommandLine* command_line) {
|
||||
#if defined(OS_MACOSX)
|
||||
// On Mac, the video-capture and audio services require a CFRunLoop, provided
|
||||
// by a UI message loop, to run AVFoundation and CoreAudio code.
|
||||
// See https://crbug.com/834581
|
||||
if (identity.name() == video_capture::mojom::kServiceName ||
|
||||
identity.name() == audio::mojom::kServiceName)
|
||||
command_line->AppendSwitch(switches::kMessageLoopTypeUi);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CefContentBrowserClient::ShouldEnableStrictSiteIsolation() {
|
||||
// TODO(cef): Enable this mode once we figure out why it breaks ceftests that
|
||||
// rely on command-line arguments passed to the renderer process. It looks
|
||||
|
@ -61,6 +61,9 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
content::BrowserContext* context2) override;
|
||||
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
|
||||
int child_process_id) override;
|
||||
void AdjustUtilityServiceProcessCommandLine(
|
||||
const service_manager::Identity& identity,
|
||||
base::CommandLine* command_line) override;
|
||||
bool ShouldEnableStrictSiteIsolation() override;
|
||||
std::string GetApplicationLocale() override;
|
||||
content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user