#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/mediastream/media_stream_device_observer.h"
#include <stddef.h>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "third_party/blink/public/platform/interface_registry.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/modules/mediastream/user_media_processor.h"
namespace blink {
namespace {
bool RemoveStreamDeviceFromArray(const MediaStreamDevice& device,
MediaStreamDevices* devices) { … }
}
MediaStreamDeviceObserver::MediaStreamDeviceObserver(LocalFrame* frame) { … }
MediaStreamDeviceObserver::~MediaStreamDeviceObserver() = default;
MediaStreamDevices MediaStreamDeviceObserver::GetNonScreenCaptureDevices() { … }
void MediaStreamDeviceObserver::OnDeviceStopped(
const String& label,
const MediaStreamDevice& device) { … }
void MediaStreamDeviceObserver::OnDeviceChanged(
const String& label,
const MediaStreamDevice& old_device,
const MediaStreamDevice& new_device) { … }
void MediaStreamDeviceObserver::OnDeviceRequestStateChange(
const String& label,
const MediaStreamDevice& device,
const mojom::blink::MediaStreamStateChange new_state) { … }
void MediaStreamDeviceObserver::OnDeviceCaptureConfigurationChange(
const String& label,
const MediaStreamDevice& device) { … }
void MediaStreamDeviceObserver::OnDeviceCaptureHandleChange(
const String& label,
const MediaStreamDevice& device) { … }
void MediaStreamDeviceObserver::OnZoomLevelChange(
const String& label,
const MediaStreamDevice& device,
int zoom_level) { … }
void MediaStreamDeviceObserver::BindMediaStreamDeviceObserverReceiver(
mojo::PendingReceiver<mojom::blink::MediaStreamDeviceObserver> receiver) { … }
void MediaStreamDeviceObserver::AddStreams(
const String& label,
const mojom::blink::StreamDevicesSet& stream_devices_set,
const WebMediaStreamDeviceObserver::StreamCallbacks& stream_callbacks) { … }
void MediaStreamDeviceObserver::AddStream(const String& label,
const MediaStreamDevice& device) { … }
bool MediaStreamDeviceObserver::RemoveStreams(const String& label) { … }
void MediaStreamDeviceObserver::RemoveStreamDevice(
const MediaStreamDevice& device) { … }
base::UnguessableToken MediaStreamDeviceObserver::GetAudioSessionId(
const String& label) { … }
base::UnguessableToken MediaStreamDeviceObserver::GetVideoSessionId(
const String& label) { … }
bool MediaStreamDeviceObserver::Stream::ContainsDevice(
const MediaStreamDevice& device) const { … }
}