#include "content/services/auction_worklet/for_debugging_only_bindings.h"
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/strings/strcat.h"
#include "content/services/auction_worklet/auction_v8_helper.h"
#include "content/services/auction_worklet/auction_v8_logger.h"
#include "content/services/auction_worklet/webidl_compat.h"
#include "third_party/blink/public/common/features.h"
#include "url/gurl.h"
#include "url/url_constants.h"
#include "v8/include/v8-exception.h"
#include "v8/include/v8-external.h"
#include "v8/include/v8-function-callback.h"
#include "v8/include/v8-function.h"
#include "v8/include/v8-template.h"
namespace auction_worklet {
namespace {
void ParseAndSetDebugUrl(AuctionV8Helper* v8_helper,
AuctionV8Logger* v8_logger,
const v8::FunctionCallbackInfo<v8::Value>& args,
const char* function_name,
std::optional<GURL>& url_out) { … }
}
ForDebuggingOnlyBindings::ForDebuggingOnlyBindings(AuctionV8Helper* v8_helper,
AuctionV8Logger* v8_logger)
: … { … }
ForDebuggingOnlyBindings::~ForDebuggingOnlyBindings() = default;
void ForDebuggingOnlyBindings::AttachToContext(v8::Local<v8::Context> context) { … }
void ForDebuggingOnlyBindings::Reset() { … }
std::optional<GURL> ForDebuggingOnlyBindings::TakeLossReportUrl() { … }
std::optional<GURL> ForDebuggingOnlyBindings::TakeWinReportUrl() { … }
void ForDebuggingOnlyBindings::ReportAdAuctionLoss(
const v8::FunctionCallbackInfo<v8::Value>& args) { … }
void ForDebuggingOnlyBindings::ReportAdAuctionWin(
const v8::FunctionCallbackInfo<v8::Value>& args) { … }
}