#include "third_party/blink/renderer/modules/presentation/presentation_request.h"
#include <memory>
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_capture_latency.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_presentation_source.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_union_presentationsource_usvstring.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/loader/mixed_content_checker.h"
#include "third_party/blink/renderer/modules/event_target_modules.h"
#include "third_party/blink/renderer/modules/presentation/presentation_availability.h"
#include "third_party/blink/renderer/modules/presentation/presentation_availability_callbacks.h"
#include "third_party/blink/renderer/modules/presentation/presentation_availability_state.h"
#include "third_party/blink/renderer/modules/presentation/presentation_connection.h"
#include "third_party/blink/renderer/modules/presentation/presentation_connection_callbacks.h"
#include "third_party/blink/renderer/modules/presentation/presentation_controller.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
namespace blink {
namespace {
bool IsKnownProtocolForPresentationUrl(const KURL& url) { … }
int GetPlayoutDelay(const PresentationSource& source) { … }
KURL CreateMirroringUrl(const PresentationSource& source) { … }
KURL CreateUrlFromSource(const ExecutionContext& execution_context,
const PresentationSource& source) { … }
}
PresentationRequest* PresentationRequest::Create(
ExecutionContext* execution_context,
const String& url,
ExceptionState& exception_state) { … }
PresentationRequest* PresentationRequest::Create(
ExecutionContext* execution_context,
const HeapVector<Member<V8UnionPresentationSourceOrUSVString>>& sources,
ExceptionState& exception_state) { … }
const AtomicString& PresentationRequest::InterfaceName() const { … }
ExecutionContext* PresentationRequest::GetExecutionContext() const { … }
void PresentationRequest::AddedEventListener(
const AtomicString& event_type,
RegisteredEventListener& registered_listener) { … }
bool PresentationRequest::HasPendingActivity() const { … }
ScriptPromise<PresentationConnection> PresentationRequest::start(
ScriptState* script_state,
ExceptionState& exception_state) { … }
ScriptPromise<PresentationConnection> PresentationRequest::reconnect(
ScriptState* script_state,
const String& id,
ExceptionState& exception_state) { … }
ScriptPromise<PresentationAvailability> PresentationRequest::getAvailability(
ScriptState* script_state,
ExceptionState& exception_state) { … }
const Vector<KURL>& PresentationRequest::Urls() const { … }
void PresentationRequest::Trace(Visitor* visitor) const { … }
PresentationRequest::PresentationRequest(ExecutionContext* execution_context,
const Vector<KURL>& urls)
: … { … }
}