#include "chrome/browser/ui/views/media_preview/active_devices_media_coordinator.h"
#include <memory>
#include <string>
#include <vector>
#include "base/check_op.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/media_preview/media_preview_metrics.h"
#include "chrome/browser/ui/views/media_preview/media_view.h"
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/media_device_id.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom.h"
#include "ui/views/view.h"
#include "ui/views/view_class_properties.h"
namespace {
constexpr char kMutableCoordinatorId[] = …;
EligibleDevices;
bool IsWithinWebContents(content::GlobalRenderFrameHostId render_frame_host_id,
base::WeakPtr<content::WebContents> web_contents) { … }
std::unique_ptr<views::Separator> CreateSeparator() { … }
}
ActiveDevicesMediaCoordinator::ActiveDevicesMediaCoordinator(
base::WeakPtr<content::WebContents> web_contents,
MediaCoordinator::ViewType view_type,
MediaView* container,
media_preview_metrics::Context metrics_context)
: … { … }
ActiveDevicesMediaCoordinator::~ActiveDevicesMediaCoordinator() = default;
void ActiveDevicesMediaCoordinator::UpdateDevicePreferenceRanking() { … }
void ActiveDevicesMediaCoordinator::UpdateMediaCoordinatorList() { … }
void ActiveDevicesMediaCoordinator::GotDeviceIdsOpenedForWebContents(
std::vector<std::string> active_device_ids) { … }
void ActiveDevicesMediaCoordinator::CreateMutableCoordinator() { … }
void ActiveDevicesMediaCoordinator::CreateImmutableCoordinators(
std::vector<std::string> active_device_ids) { … }
void ActiveDevicesMediaCoordinator::AddMediaCoordinatorForDevice(
const std::optional<std::string>& active_device_id) { … }
void ActiveDevicesMediaCoordinator::OnRequestUpdate(
int render_process_id,
int render_frame_id,
blink::mojom::MediaStreamType stream_type,
const content::MediaRequestState state) { … }
void ActiveDevicesMediaCoordinator::OnPermissionChange(bool has_permission) { … }
std::vector<std::string>
ActiveDevicesMediaCoordinator::GetMediaCoordinatorKeys() { … }