#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/ui/webui/data_sharing/data_sharing_ui.h"
#include "chrome/browser/companion/core/utils.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/data_sharing/data_sharing_page_handler.h"
#include "chrome/browser/ui/webui/webui_util.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/data_sharing_resources.h"
#include "chrome/grit/data_sharing_resources_map.h"
#include "components/data_sharing/public/features.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "ui/webui/webui_allowlist.h"
DataSharingUIConfig::DataSharingUIConfig()
: … { … }
DataSharingUIConfig::~DataSharingUIConfig() = default;
bool DataSharingUIConfig::IsWebUIEnabled(
content::BrowserContext* browser_context) { … }
bool DataSharingUIConfig::ShouldAutoResizeHost() { … }
DataSharingUI::DataSharingUI(content::WebUI* web_ui)
: … { … }
DataSharingUI::~DataSharingUI() = default;
WEB_UI_CONTROLLER_TYPE_IMPL(DataSharingUI)
void DataSharingUI::BindInterface(
mojo::PendingReceiver<data_sharing::mojom::PageHandlerFactory> receiver) { … }
void DataSharingUI::ApiInitComplete() { … }
void DataSharingUI::CreatePageHandler(
mojo::PendingRemote<data_sharing::mojom::Page> page,
mojo::PendingReceiver<data_sharing::mojom::PageHandler> receiver) { … }