#include "chrome/browser/ui/media_router/media_router_ui_helper.h"
#include "base/atomic_sequence_num.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "components/media_router/browser/presentation/start_presentation_context.h"
#include "extensions/browser/extension_registry.h"
#include "url/gurl.h"
#if BUILDFLAG(IS_MAC)
#include "ui/base/cocoa/permissions_utils.h"
#endif
namespace media_router {
namespace {
const int kCreateRouteTimeoutSeconds = …;
const int kCreateRouteTimeoutSecondsForTab = …;
const int kCreateRouteTimeoutSecondsForDesktop = …;
const int kCreateRouteTimeoutSecondsForRemotePlayback = …;
#if BUILDFLAG(IS_MAC)
std::optional<bool> g_screen_capture_allowed_for_testing;
#endif
}
std::string GetExtensionName(const GURL& gurl,
extensions::ExtensionRegistry* registry) { … }
std::string GetHostFromURL(const GURL& gurl) { … }
base::TimeDelta GetRouteRequestTimeout(MediaCastMode cast_mode) { … }
bool RequiresScreenCapturePermission(MediaCastMode cast_mode) { … }
bool GetScreenCapturePermission() { … }
void set_screen_capture_allowed_for_testing(bool allowed) { … }
void clear_screen_capture_allowed_for_testing() { … }
RouteRequest::RouteRequest(const MediaSink::Id& sink_id) : … { … }
RouteRequest::~RouteRequest() = default;
RouteParameters::RouteParameters() = default;
RouteParameters::RouteParameters(RouteParameters&& other) = default;
RouteParameters::~RouteParameters() = default;
RouteParameters& RouteParameters::operator=(RouteParameters&& other) = default;
MediaRouterUIParameters::MediaRouterUIParameters(
CastModeSet initial_modes,
content::WebContents* initiator,
std::unique_ptr<StartPresentationContext> start_presentation_context,
media::VideoCodec video_codec,
media::AudioCodec audio_codec)
: … { … }
MediaRouterUIParameters::MediaRouterUIParameters(
MediaRouterUIParameters&& other) = default;
MediaRouterUIParameters::~MediaRouterUIParameters() = default;
}