#include "third_party/blink/renderer/core/inspector/inspector_media_agent.h"
#include "third_party/blink/renderer/core/inspector/inspector_media_context_impl.h"
#include <utility>
#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/page/page.h"
#include "third_party/blink/renderer/core/workers/worker_global_scope.h"
namespace blink {
namespace {
const char* ConvertMessageLevelEnum(InspectorPlayerMessage::Level level) { … }
std::unique_ptr<protocol::Media::PlayerEvent> ConvertToProtocolType(
const InspectorPlayerEvent& event) { … }
std::unique_ptr<protocol::Media::PlayerProperty> ConvertToProtocolType(
const InspectorPlayerProperty& property) { … }
std::unique_ptr<protocol::Media::PlayerMessage> ConvertToProtocolType(
const InspectorPlayerMessage& message) { … }
std::unique_ptr<protocol::Media::PlayerErrorSourceLocation>
ConvertToProtocolType(const InspectorPlayerError::SourceLocation& stack) { … }
std::unique_ptr<protocol::Media::PlayerError> ConvertToProtocolType(
const InspectorPlayerError& error) { … }
template <typename To, typename From>
std::unique_ptr<protocol::Array<To>> ConvertVector(const Vector<From>& from) { … }
}
InspectorMediaAgent::InspectorMediaAgent(InspectedFrames* inspected_frames,
WorkerGlobalScope* worker_global_scope)
: … { … }
InspectorMediaAgent::~InspectorMediaAgent() = default;
ExecutionContext* InspectorMediaAgent::GetTargetExecutionContext() const { … }
void InspectorMediaAgent::Restore() { … }
void InspectorMediaAgent::RegisterAgent() { … }
protocol::Response InspectorMediaAgent::enable() { … }
protocol::Response InspectorMediaAgent::disable() { … }
void InspectorMediaAgent::PlayerPropertiesChanged(
const WebString& playerId,
const Vector<InspectorPlayerProperty>& properties) { … }
void InspectorMediaAgent::PlayerEventsAdded(
const WebString& playerId,
const Vector<InspectorPlayerEvent>& events) { … }
void InspectorMediaAgent::PlayerErrorsRaised(
const WebString& playerId,
const Vector<InspectorPlayerError>& errors) { … }
void InspectorMediaAgent::PlayerMessagesLogged(
const WebString& playerId,
const Vector<InspectorPlayerMessage>& messages) { … }
void InspectorMediaAgent::PlayersCreated(const Vector<WebString>& player_ids) { … }
void InspectorMediaAgent::Trace(Visitor* visitor) const { … }
}