#include "content/services/auction_worklet/seller_lazy_filler.h"
#include <string>
#include <string_view>
#include <vector>
#include "base/strings/strcat.h"
#include "content/services/auction_worklet/auction_v8_helper.h"
#include "content/services/auction_worklet/auction_worklet_util.h"
#include "gin/converter.h"
#include "gin/dictionary.h"
#include "third_party/blink/public/common/interest_group/ad_display_size_utils.h"
#include "third_party/blink/public/common/interest_group/auction_config.h"
#include "v8/include/v8-container.h"
#include "v8/include/v8-exception.h"
#include "v8/include/v8-external.h"
#include "v8/include/v8-json.h"
#include "v8/include/v8-template.h"
namespace auction_worklet {
namespace {
bool HasTimeouts(const blink::AuctionConfig::MaybePromiseBuyerTimeouts&
maybe_promise_buyer_timeouts) { … }
bool CreatePerBuyerTimeoutsObject(
v8::Isolate* isolate,
const blink::AuctionConfig::MaybePromiseBuyerTimeouts&
maybe_promise_buyer_timeouts,
v8::Local<v8::Object>& out_per_buyer_timeouts) { … }
bool HasCurrencies(const blink::AuctionConfig::MaybePromiseBuyerCurrencies&
maybe_promise_buyer_currencies) { … }
bool CreatePerBuyerCurrenciesObject(
v8::Isolate* isolate,
const blink::AuctionConfig::MaybePromiseBuyerCurrencies&
maybe_promise_buyer_currencies,
v8::Local<v8::Object>& out_per_buyer_currencies) { … }
bool InsertPrioritySignals(
AuctionV8Helper* v8_helper,
std::string_view key,
const base::flat_map<std::string, double>& priority_signals,
v8::Local<v8::Object> object) { … }
bool SetDictMember(v8::Isolate* isolate,
v8::Local<v8::Object> object,
const std::string& key,
v8::Local<v8::Value> v8_value) { … }
bool CreateAdSizeObject(v8::Isolate* isolate,
const blink::AdSize& ad_size,
v8::Local<v8::Object>& ad_size_out) { … }
}
SellerBrowserSignalsLazyFiller::SellerBrowserSignalsLazyFiller(
AuctionV8Helper* v8_helper,
AuctionV8Logger* v8_logger)
: … { … }
void SellerBrowserSignalsLazyFiller::Reset() { … }
bool SellerBrowserSignalsLazyFiller::FillInObject(
const GURL& browser_signal_render_url,
v8::Local<v8::Object> object) { … }
void SellerBrowserSignalsLazyFiller::HandleDeprecatedRenderUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
AuctionConfigLazyFiller::AuctionConfigLazyFiller(AuctionV8Helper* v8_helper,
AuctionV8Logger* v8_logger)
: … { … }
void AuctionConfigLazyFiller::Reset() { … }
bool AuctionConfigLazyFiller::FillInObject(
const blink::AuctionConfig::NonSharedParams&
auction_ad_config_non_shared_params,
base::optional_ref<const GURL> decision_logic_url,
base::optional_ref<const GURL> trusted_scoring_signals_url,
v8::Local<v8::Object> object) { … }
void AuctionConfigLazyFiller::HandleInterestGroupBuyers(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void AuctionConfigLazyFiller::HandleDeprecatedRenderURLReplacements(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void AuctionConfigLazyFiller::HandlePerBuyerSignals(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void AuctionConfigLazyFiller::HandlePerBuyerTimeouts(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void AuctionConfigLazyFiller::HandlePerBuyerCumulativeTimeouts(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void AuctionConfigLazyFiller::HandleTimeoutsImpl(
const v8::PropertyCallbackInfo<v8::Value>& info,
const blink::AuctionConfig::MaybePromiseBuyerTimeouts&
maybe_promise_buyer_timeouts) { … }
void AuctionConfigLazyFiller::HandlePerBuyerCurrencies(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void AuctionConfigLazyFiller::HandlePerBuyerPrioritySignals(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void AuctionConfigLazyFiller::HandleRequestedSize(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void AuctionConfigLazyFiller::HandleAllSlotsRequestedSizes(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void AuctionConfigLazyFiller::HandleDeprecatedDecisionLogicUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void AuctionConfigLazyFiller::HandleDeprecatedTrustedScoringSignalsUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
}