#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/ui/webui/tab_search/tab_search_ui.h"
#include <algorithm>
#include "base/metrics/histogram_functions.h"
#include "base/trace_event/trace_event.h"
#include "build/branding_buildflags.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/tabs/organization/tab_organization_service_factory.h"
#include "chrome/browser/ui/tabs/organization/tab_organization_utils.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/webui/favicon_source.h"
#include "chrome/browser/ui/webui/tab_search/tab_search_prefs.h"
#include "chrome/browser/ui/webui/tab_search/tab_search_sync_handler.h"
#include "chrome/browser/ui/webui/webui_util.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/tab_search_resources.h"
#include "chrome/grit/tab_search_resources_map.h"
#include "components/favicon_base/favicon_url_parser.h"
#include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.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/base/accelerators/accelerator.h"
#include "ui/base/webui/web_ui_util.h"
#include "ui/views/style/platform_style.h"
#include "ui/webui/color_change_listener/color_change_handler.h"
TabSearchUIConfig::TabSearchUIConfig()
: … { … }
bool TabSearchUIConfig::ShouldAutoResizeHost() { … }
bool TabSearchUIConfig::IsPreloadable() { … }
std::optional<int> TabSearchUIConfig::GetCommandIdForTesting() { … }
TabSearchUI::TabSearchUI(content::WebUI* web_ui)
: … { … }
TabSearchUI::~TabSearchUI() = default;
WEB_UI_CONTROLLER_TYPE_IMPL(TabSearchUI)
void TabSearchUI::BindInterface(
mojo::PendingReceiver<color_change_listener::mojom::PageHandler>
pending_receiver) { … }
void TabSearchUI::BindInterface(
mojo::PendingReceiver<tab_search::mojom::PageHandlerFactory> receiver) { … }
void TabSearchUI::BindInterface(
mojo::PendingReceiver<metrics_reporter::mojom::PageMetricsHost> receiver) { … }
void TabSearchUI::CreatePageHandler(
mojo::PendingRemote<tab_search::mojom::Page> page,
mojo::PendingReceiver<tab_search::mojom::PageHandler> receiver) { … }
bool TabSearchUI::ShowTabOrganizationFRE() { … }
int TabSearchUI::TabIndex() { … }