#include "content/services/auction_worklet/auction_v8_devtools_session.h"
#include <stdint.h>
#include <set>
#include <string>
#include <vector>
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/notreached.h"
#include "base/sequence_checker.h"
#include "base/strings/stringprintf.h"
#include "base/task/sequenced_task_runner.h"
#include "content/services/auction_worklet/auction_v8_helper.h"
#include "content/services/auction_worklet/auction_v8_inspector_util.h"
#include "content/services/auction_worklet/debug_command_queue.h"
#include "content/services/auction_worklet/protocol/event_breakpoints.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "third_party/inspector_protocol/crdtp/cbor.h"
#include "third_party/inspector_protocol/crdtp/dispatch.h"
#include "third_party/inspector_protocol/crdtp/frontend_channel.h"
#include "third_party/inspector_protocol/crdtp/json.h"
#include "third_party/inspector_protocol/crdtp/protocol_core.h"
#include "third_party/inspector_protocol/crdtp/span.h"
namespace auction_worklet {
class AuctionV8DevToolsSession::BreakpointHandler
: public auction_worklet::protocol::EventBreakpoints::Backend { … };
class AuctionV8DevToolsSession::IOSession
: public blink::mojom::DevToolsSession { … };
AuctionV8DevToolsSession::AuctionV8DevToolsSession(
AuctionV8Helper* v8_helper,
scoped_refptr<DebugCommandQueue> debug_command_queue,
int context_group_id,
const std::string& session_id,
bool client_expects_binary_responses,
bool session_waits_for_debugger,
mojo::PendingAssociatedRemote<blink::mojom::DevToolsSessionHost> host,
scoped_refptr<base::SequencedTaskRunner> io_session_receiver_sequence,
mojo::PendingReceiver<blink::mojom::DevToolsSession> io_session_receiver,
SessionDestroyedCallback on_delete_callback)
: … { … }
AuctionV8DevToolsSession::~AuctionV8DevToolsSession() { … }
base::OnceClosure AuctionV8DevToolsSession::MakeAbortPauseCallback() { … }
void AuctionV8DevToolsSession::MaybeTriggerInstrumentationBreakpoint(
const std::string& name) { … }
void AuctionV8DevToolsSession::DispatchProtocolCommandFromIO(
int32_t call_id,
const std::string& method,
std::vector<uint8_t> message) { … }
void AuctionV8DevToolsSession::DispatchProtocolCommand(
int32_t call_id,
const std::string& method,
base::span<const uint8_t> message) { … }
void AuctionV8DevToolsSession::sendResponse(
int call_id,
std::unique_ptr<v8_inspector::StringBuffer> message) { … }
void AuctionV8DevToolsSession::sendNotification(
std::unique_ptr<v8_inspector::StringBuffer> message) { … }
void AuctionV8DevToolsSession::flushProtocolNotifications() { … }
void AuctionV8DevToolsSession::SendProtocolResponse(
int call_id,
std::unique_ptr<crdtp::Serializable> message) { … }
void AuctionV8DevToolsSession::SendProtocolNotification(
std::unique_ptr<crdtp::Serializable> message) { … }
void AuctionV8DevToolsSession::FallThrough(int call_id,
crdtp::span<uint8_t> method,
crdtp::span<uint8_t> message) { … }
void AuctionV8DevToolsSession::FlushProtocolNotifications() { … }
void AuctionV8DevToolsSession::AbortDebuggerPause() { … }
void AuctionV8DevToolsSession::SendProtocolResponseImpl(
int call_id,
std::vector<uint8_t> message) { … }
void AuctionV8DevToolsSession::SendNotificationImpl(
std::vector<uint8_t> message) { … }
blink::mojom::DevToolsMessagePtr AuctionV8DevToolsSession::FinalizeMessage(
std::vector<uint8_t> message) const { … }
}