#include "content/services/auction_worklet/bidder_lazy_filler.h"
#include <string>
#include <string_view>
#include <vector>
#include "base/functional/callback.h"
#include "content/services/auction_worklet/auction_v8_helper.h"
#include "content/services/auction_worklet/auction_v8_logger.h"
#include "content/services/auction_worklet/public/mojom/bidder_worklet.mojom.h"
#include "gin/converter.h"
#include "gin/dictionary.h"
#include "third_party/blink/public/common/interest_group/interest_group.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 {
v8::MaybeLocal<v8::Value> CreatePrevWinsArray(
PrevWinsType prev_wins_type,
AuctionV8Helper* v8_helper,
v8::Local<v8::Context> context,
base::Time auction_start_time,
std::vector<mojom::PreviousWinPtr>& prev_wins) { … }
}
InterestGroupLazyFiller::InterestGroupLazyFiller(AuctionV8Helper* v8_helper,
AuctionV8Logger* v8_logger)
: … { … }
void InterestGroupLazyFiller::ReInitialize(
const GURL* bidding_logic_url,
const GURL* bidding_wasm_helper_url,
const GURL* trusted_bidding_signals_url,
const mojom::BidderWorkletNonSharedParams*
bidder_worklet_non_shared_params) { … }
bool InterestGroupLazyFiller::FillInObject(
v8::Local<v8::Object> object,
base::RepeatingCallback<bool(const std::string&)> is_ad_excluded,
base::RepeatingCallback<bool(const std::string&)> is_ad_component_excluded,
base::RepeatingCallback<bool(const std::string&,
base::optional_ref<const std::string>,
base::optional_ref<const std::string>,
base::optional_ref<const std::string>)>
is_reporting_id_set_excluded) { … }
void InterestGroupLazyFiller::Reset() { … }
bool InterestGroupLazyFiller::CreateAdVector(
v8::Local<v8::Object>& object,
std::string_view name,
base::RepeatingCallback<bool(const std::string&)> is_ad_excluded,
base::RepeatingCallback<bool(const std::string&,
base::optional_ref<const std::string>,
base::optional_ref<const std::string>,
base::optional_ref<const std::string>)>
is_reporting_id_set_excluded,
const std::vector<blink::InterestGroup::Ad>& ads,
v8::Local<v8::ObjectTemplate>& lazy_filler_template) { … }
void InterestGroupLazyFiller::HandleUserBiddingSignals(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleBiddingLogicUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleDeprecatedBiddingLogicUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleBiddingWasmHelperUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleDeprecatedBiddingWasmHelperUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleUpdateUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleDeprecatedUpdateUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleDeprecatedDailyUpdateUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleTrustedBiddingSignalsUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleDeprecatedTrustedBiddingSignalsUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleTrustedBiddingSignalsKeys(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandlePriorityVector(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleUseBiddingSignalsPrioritization(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void InterestGroupLazyFiller::HandleDeprecatedAdsRenderUrl(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
BiddingBrowserSignalsLazyFiller::BiddingBrowserSignalsLazyFiller(
AuctionV8Helper* v8_helper)
: … { … }
void BiddingBrowserSignalsLazyFiller::ReInitialize(
mojom::BiddingBrowserSignals* bidder_browser_signals,
base::Time auction_start_time) { … }
bool BiddingBrowserSignalsLazyFiller::FillInObject(
v8::Local<v8::Object> object) { … }
void BiddingBrowserSignalsLazyFiller::Reset() { … }
void BiddingBrowserSignalsLazyFiller::HandlePrevWins(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void BiddingBrowserSignalsLazyFiller::HandlePrevWinsMs(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void BiddingBrowserSignalsLazyFiller::HandlePrevWinsInternal(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info,
PrevWinsType prev_wins_type) { … }
}