#ifndef CONTENT_WEB_TEST_BROWSER_WEB_TEST_PRIVACY_SANDBOX_H_
#define CONTENT_WEB_TEST_BROWSER_WEB_TEST_PRIVACY_SANDBOX_H_
#include "content/public/browser/web_contents_user_data.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "third_party/blink/public/test/mojom/privacy_sandbox/web_privacy_sandbox_automation.test-mojom.h"
namespace content {
class WebContents;
class WebTestPrivacySandbox
: public blink::test::mojom::WebPrivacySandboxAutomation,
public WebContentsUserData<WebTestPrivacySandbox> {
public:
static WebTestPrivacySandbox* GetOrCreate(WebContents*);
WebTestPrivacySandbox(const WebTestPrivacySandbox&) = delete;
WebTestPrivacySandbox& operator=(const WebTestPrivacySandbox&) = delete;
~WebTestPrivacySandbox() override;
void Bind(
mojo::PendingReceiver<blink::test::mojom::WebPrivacySandboxAutomation>
receiver);
void SetProtectedAudienceKAnonymity(
const url::Origin& owner_origin,
const std::string& name,
const std::vector<std::string>& hashes,
SetProtectedAudienceKAnonymityCallback callback) override;
private:
explicit WebTestPrivacySandbox(WebContents* web_contents);
mojo::ReceiverSet<blink::test::mojom::WebPrivacySandboxAutomation> receivers_;
friend WebContentsUserData;
WEB_CONTENTS_USER_DATA_KEY_DECL();
};
}
#endif