#include "chrome/browser/media/webrtc/desktop_media_picker_controller.h"
#include <memory>
#include <tuple>
#include <utility>
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/media/webrtc/capture_policy_utils.h"
#include "chrome/browser/media/webrtc/desktop_media_picker.h"
#include "chrome/browser/media/webrtc/desktop_media_picker_factory_impl.h"
#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
#include "chrome/browser/media/webrtc/native_desktop_media_list.h"
#include "chrome/browser/media/webrtc/tab_desktop_media_list.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/grit/branded_strings.h"
#include "content/public/browser/desktop_capture.h"
#include "content/public/browser/desktop_streams_registry.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "desktop_media_picker.h"
#include "extensions/common/manifest.h"
#include "extensions/common/switches.h"
#include "media/audio/audio_features.h"
#include "media/base/media_switches.h"
#include "ui/base/l10n/l10n_util.h"
DesktopMediaPickerController::DesktopMediaPickerController(
DesktopMediaPickerFactory* picker_factory)
: … { … }
DesktopMediaPickerController::~DesktopMediaPickerController() = default;
void DesktopMediaPickerController::Show(
const Params& params,
const std::vector<DesktopMediaList::Type>& sources,
DesktopMediaList::WebContentsFilter includable_web_contents_filter,
DoneCallback done_callback) { … }
void DesktopMediaPickerController::WebContentsDestroyed() { … }
bool DesktopMediaPickerController::IsSystemAudioCaptureSupported(
Params::RequestSource request_source) { … }
void DesktopMediaPickerController::OnInitialMediaListFound() { … }
void DesktopMediaPickerController::ShowPickerDialog() { … }
void DesktopMediaPickerController::OnPickerDialogResults(
const std::string& err,
content::DesktopMediaID source) { … }