#include "content/browser/media/capture/desktop_streams_registry_impl.h"
#include "base/base64.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/no_destructor.h"
#include "base/time/time.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "crypto/random.h"
namespace {
const int kStreamIdLengthBytes = …;
const int kApprovedStreamTimeToLiveSeconds = …;
std::string GenerateRandomStreamId() { … }
}
namespace content {
DesktopStreamsRegistry* DesktopStreamsRegistry::GetInstance() { … }
DesktopStreamsRegistryImpl* DesktopStreamsRegistryImpl::GetInstance() { … }
DesktopStreamsRegistryImpl::DesktopStreamsRegistryImpl() { … }
DesktopStreamsRegistryImpl::~DesktopStreamsRegistryImpl() { … }
std::string DesktopStreamsRegistryImpl::RegisterStream(
int render_process_id,
std::optional<int> restrict_to_render_frame_id,
const url::Origin& origin,
const DesktopMediaID& source,
const DesktopStreamRegistryType type) { … }
DesktopMediaID DesktopStreamsRegistryImpl::RequestMediaForStreamId(
const std::string& id,
int render_process_id,
int render_frame_id,
const url::Origin& origin,
const DesktopStreamRegistryType type) { … }
void DesktopStreamsRegistryImpl::CleanupStream(const std::string& id) { … }
}