#include "third_party/blink/renderer/modules/webaudio/inspector_web_audio_agent.h"
#include <memory>
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/modules/webaudio/base_audio_context.h"
#include "third_party/blink/renderer/modules/webaudio/audio_context.h"
#include "third_party/blink/renderer/modules/webaudio/audio_graph_tracer.h"
#include "third_party/blink/renderer/modules/webaudio/audio_listener.h"
#include "third_party/blink/renderer/modules/webaudio/audio_node.h"
#include "third_party/blink/renderer/modules/webaudio/audio_param.h"
namespace blink {
namespace {
String GetContextTypeEnum(BaseAudioContext* context) { … }
String GetContextStateEnum(BaseAudioContext* context) { … }
String StripNodeSuffix(const String& nodeName) { … }
String StripParamPrefix(const String& paramName) { … }
}
InspectorWebAudioAgent::InspectorWebAudioAgent(Page* page)
: … { … }
InspectorWebAudioAgent::~InspectorWebAudioAgent() = default;
void InspectorWebAudioAgent::Restore() { … }
protocol::Response InspectorWebAudioAgent::enable() { … }
protocol::Response InspectorWebAudioAgent::disable() { … }
protocol::Response InspectorWebAudioAgent::getRealtimeData(
const protocol::WebAudio::GraphObjectId& contextId,
std::unique_ptr<ContextRealtimeData>* out_data) { … }
void InspectorWebAudioAgent::DidCreateBaseAudioContext(
BaseAudioContext* context) { … }
void InspectorWebAudioAgent::WillDestroyBaseAudioContext(
BaseAudioContext* context) { … }
void InspectorWebAudioAgent::DidChangeBaseAudioContext(
BaseAudioContext* context) { … }
void InspectorWebAudioAgent::DidCreateAudioListener(AudioListener* listener) { … }
void InspectorWebAudioAgent::WillDestroyAudioListener(AudioListener* listener) { … }
void InspectorWebAudioAgent::DidCreateAudioNode(AudioNode* node) { … }
void InspectorWebAudioAgent::WillDestroyAudioNode(AudioNode* node) { … }
void InspectorWebAudioAgent::DidCreateAudioParam(AudioParam* param) { … }
void InspectorWebAudioAgent::WillDestroyAudioParam(AudioParam* param) { … }
void InspectorWebAudioAgent::DidConnectNodes(
AudioNode* source_node,
AudioNode* destination_node,
int32_t source_output_index,
int32_t destination_input_index) { … }
void InspectorWebAudioAgent::DidDisconnectNodes(
AudioNode* source_node,
AudioNode* destination_node,
int32_t source_output_index,
int32_t destination_input_index) { … }
void InspectorWebAudioAgent::DidConnectNodeParam(
AudioNode* source_node,
AudioParam* destination_param,
int32_t source_output_index) { … }
void InspectorWebAudioAgent::DidDisconnectNodeParam(
AudioNode* source_node,
AudioParam* destination_param,
int32_t source_output_index) { … }
std::unique_ptr<protocol::WebAudio::BaseAudioContext>
InspectorWebAudioAgent::BuildProtocolContext(BaseAudioContext* context) { … }
void InspectorWebAudioAgent::Trace(Visitor* visitor) const { … }
}