chromium/chrome/browser/ui/media_router/media_router_ui_helper.h

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_MEDIA_ROUTER_MEDIA_ROUTER_UI_HELPER_H_
#define CHROME_BROWSER_UI_MEDIA_ROUTER_MEDIA_ROUTER_UI_HELPER_H_

#include <string>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/ui/media_router/media_cast_mode.h"
#include "components/media_router/browser/media_router.h"
#include "components/media_router/common/media_sink.h"
#include "components/media_router/common/media_source.h"
#include "media/base/audio_codecs.h"
#include "media/base/video_codecs.h"
#include "url/origin.h"

namespace extensions {
class ExtensionRegistry;
}

class GURL;

namespace media_router {

class StartPresentationContext;

// Returns the extension name for |url|, so that it can be displayed for
// extension-initiated presentations.
std::string GetExtensionName(const GURL& url,
                             extensions::ExtensionRegistry* registry);

std::string GetHostFromURL(const GURL& gurl);

// Returns the duration to wait for route creation result before we time out.
base::TimeDelta GetRouteRequestTimeout(MediaCastMode cast_mode);

// Determines if the specified cast mode requires permission from the user
// in order to proceed.
bool RequiresScreenCapturePermission(MediaCastMode cast_mode);

// Requests permission for screen capturing.
bool GetScreenCapturePermission();

void set_screen_capture_allowed_for_testing(bool allowed);
void clear_screen_capture_allowed_for_testing();

// A variation of MediaRouteResponseCallback that doesn't require the
// PresentationConnection objects.
MediaRouteResultCallback;

struct RouteRequest {};

// Contains parameters passed to MediaRouterUI's constructor.
struct MediaRouterUIParameters {};

// Contains common parameters for route requests to MediaRouter.
struct RouteParameters {};

}  // namespace media_router

#endif  // CHROME_BROWSER_UI_MEDIA_ROUTER_MEDIA_ROUTER_UI_HELPER_H_