chore: bump chromium to 124.0.6323.0 (main) (#41412)
* chore: bump chromium in DEPS to 124.0.6315.0 * chore: update patches * 5279678: Stream AIDA responses5279678
* 5276439: Remove non_network_url_loader_factory_remotes_5276439
* 5310165: Add DevTools API to show search results5310165
* chore: bump chromium in DEPS to 124.0.6317.0 * chore: update patches * Remove Setup.Install.CumulativeDiskUsage2 and supporting code5314269
* browser: Make cmd line non-const in process singleton callback5311256
* chore: bump chromium in DEPS to 124.0.6319.0 * chore: bump chromium in DEPS to 124.0.6321.0 * chore: bump chromium in DEPS to 124.0.6323.0 * 5318335: Roll src/third_party/boringssl/src 23824fa0f..4fe29ebc75318335
* 5318051: [CBE Watermarking] Hoist `watermark_view` to a member variable.5318051
* chore: fixup patch indices * 4946553: Delegate HID permission to Chrome App in webview4946553
* 5310001: DevTools UI binding for reporting client events to AIDA5310001
* [libc++] Refactor the predicate taking variant of `__cxx_atomic_wait` * chore: fix browser_view patch harder * 5293937: Reland "[gUM] Use preferred device if more than one is eligible"5293937
* fix: filter {video|audio} devices by eligible device id * 5267921: enable speak content under the pointer on PWA and WV25267921
* 5310195: heap: Remove Blink's GCTaskRunner5310195
--------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
13e601e35c
commit
04df5ce492
85 changed files with 419 additions and 319 deletions
|
@ -3,8 +3,8 @@
|
|||
// found in the LICENSE-CHROMIUM file.
|
||||
|
||||
#include "shell/browser/media/media_capture_devices_dispatcher.h"
|
||||
// #include "base/no_destructor.h"
|
||||
#include "base/logging.h"
|
||||
|
||||
#include "components/webrtc/media_stream_devices_util.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/media_capture_devices.h"
|
||||
|
||||
|
@ -47,4 +47,36 @@ void MediaCaptureDevicesDispatcher::OnSetCapturingLinkSecured(
|
|||
blink::mojom::MediaStreamType stream_type,
|
||||
bool is_secure) {}
|
||||
|
||||
const std::optional<blink::MediaStreamDevice>
|
||||
MediaCaptureDevicesDispatcher::GetPreferredAudioDeviceForBrowserContext(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::vector<std::string>& eligible_audio_device_ids) const {
|
||||
auto audio_devices = GetAudioCaptureDevices();
|
||||
if (!eligible_audio_device_ids.empty()) {
|
||||
audio_devices =
|
||||
webrtc::FilterMediaDevices(audio_devices, eligible_audio_device_ids);
|
||||
}
|
||||
|
||||
if (audio_devices.empty())
|
||||
return std::nullopt;
|
||||
|
||||
return audio_devices.front();
|
||||
}
|
||||
|
||||
const std::optional<blink::MediaStreamDevice>
|
||||
MediaCaptureDevicesDispatcher::GetPreferredVideoDeviceForBrowserContext(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::vector<std::string>& eligible_video_device_ids) const {
|
||||
auto video_devices = GetVideoCaptureDevices();
|
||||
if (!eligible_video_device_ids.empty()) {
|
||||
video_devices =
|
||||
webrtc::FilterMediaDevices(video_devices, eligible_video_device_ids);
|
||||
}
|
||||
|
||||
if (video_devices.empty())
|
||||
return std::nullopt;
|
||||
|
||||
return video_devices.front();
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -37,6 +37,14 @@ class MediaCaptureDevicesDispatcher
|
|||
int page_request_id,
|
||||
blink::mojom::MediaStreamType stream_type,
|
||||
bool is_secure) override;
|
||||
const std::optional<blink::MediaStreamDevice>
|
||||
GetPreferredAudioDeviceForBrowserContext(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::vector<std::string>& eligible_audio_device_ids) const override;
|
||||
const std::optional<blink::MediaStreamDevice>
|
||||
GetPreferredVideoDeviceForBrowserContext(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::vector<std::string>& eligible_video_device_ids) const override;
|
||||
|
||||
// disable copy
|
||||
MediaCaptureDevicesDispatcher(const MediaCaptureDevicesDispatcher&) = delete;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue