#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "ui/webui/resources/cr_components/history_clusters/history_clusters.mojom.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "ui/webui/resources/cr_components/history_clusters/history_clusters.mojom-params-data.h"
#include "ui/webui/resources/cr_components/history_clusters/history_clusters.mojom-shared-message-ids.h"
#include "ui/webui/resources/cr_components/history_clusters/history_clusters.mojom-import-headers.h"
#include "ui/webui/resources/cr_components/history_clusters/history_clusters.mojom-test-utils.h"
namespace history_clusters::mojom {
QueryResult::QueryResult()
: … { … }
QueryResult::QueryResult(
const std::string& query_in,
std::vector<::history_clusters::mojom::ClusterPtr> clusters_in,
bool can_load_more_in,
bool is_continuation_in)
: … { … }
QueryResult::~QueryResult() = default;
void QueryResult::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool QueryResult::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char PageHandler::Name_[] = …;
PageHandler::IPCStableHashFunction PageHandler::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PageHandler::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PageHandler::OpenHistoryCluster_Sym::IPCStableHash() { … }
uint32_t PageHandler::SetPage_Sym::IPCStableHash() { … }
uint32_t PageHandler::ShowContextMenuForSearchbox_Sym::IPCStableHash() { … }
uint32_t PageHandler::ShowContextMenuForURL_Sym::IPCStableHash() { … }
uint32_t PageHandler::ShowSidePanelUI_Sym::IPCStableHash() { … }
uint32_t PageHandler::ToggleVisibility_Sym::IPCStableHash() { … }
uint32_t PageHandler::StartQueryClusters_Sym::IPCStableHash() { … }
uint32_t PageHandler::LoadMoreClusters_Sym::IPCStableHash() { … }
uint32_t PageHandler::HideVisits_Sym::IPCStableHash() { … }
uint32_t PageHandler::RemoveVisits_Sym::IPCStableHash() { … }
uint32_t PageHandler::OpenVisitUrlsInTabGroup_Sym::IPCStableHash() { … }
uint32_t PageHandler::RecordVisitAction_Sym::IPCStableHash() { … }
uint32_t PageHandler::RecordRelatedSearchAction_Sym::IPCStableHash() { … }
uint32_t PageHandler::RecordClusterAction_Sym::IPCStableHash() { … }
uint32_t PageHandler::RecordToggledVisibility_Sym::IPCStableHash() { … }
# endif
class PageHandler_ToggleVisibility_ForwardToCallback
: public mojo::MessageReceiver { … };
class PageHandler_HideVisits_ForwardToCallback
: public mojo::MessageReceiver { … };
class PageHandler_RemoveVisits_ForwardToCallback
: public mojo::MessageReceiver { … };
PageHandlerProxy::PageHandlerProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PageHandlerProxy::OpenHistoryCluster(
const ::GURL& in_url, ::ui::mojom::ClickModifiersPtr in_click_modifiers) { … }
void PageHandlerProxy::SetPage(
::mojo::PendingRemote<Page> in_page) { … }
void PageHandlerProxy::ShowContextMenuForSearchbox(
const std::string& in_query, const ::gfx::Point& in_point) { … }
void PageHandlerProxy::ShowContextMenuForURL(
const ::GURL& in_url, const ::gfx::Point& in_point) { … }
void PageHandlerProxy::ShowSidePanelUI(
) { … }
void PageHandlerProxy::ToggleVisibility(
bool in_visible, ToggleVisibilityCallback callback) { … }
void PageHandlerProxy::StartQueryClusters(
const std::string& in_query, std::optional<::base::Time> in_begin_time, bool in_recluster) { … }
void PageHandlerProxy::LoadMoreClusters(
const std::string& in_query) { … }
void PageHandlerProxy::HideVisits(
std::vector<::history_clusters::mojom::URLVisitPtr> in_visits, HideVisitsCallback callback) { … }
void PageHandlerProxy::RemoveVisits(
std::vector<::history_clusters::mojom::URLVisitPtr> in_visits, RemoveVisitsCallback callback) { … }
void PageHandlerProxy::OpenVisitUrlsInTabGroup(
std::vector<::history_clusters::mojom::URLVisitPtr> in_visits, const std::optional<std::string>& in_tab_group_name) { … }
void PageHandlerProxy::RecordVisitAction(
VisitAction in_visit_action, uint32_t in_visit_index, VisitType in_visit_type) { … }
void PageHandlerProxy::RecordRelatedSearchAction(
RelatedSearchAction in_action, uint32_t in_visit_index) { … }
void PageHandlerProxy::RecordClusterAction(
ClusterAction in_cluster_action, uint32_t in_cluster_index) { … }
void PageHandlerProxy::RecordToggledVisibility(
bool in_visible) { … }
class PageHandler_ToggleVisibility_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PageHandler_ToggleVisibility_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PageHandler_ToggleVisibility_ProxyToResponder::Run(
bool in_visible) { … }
class PageHandler_HideVisits_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PageHandler_HideVisits_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PageHandler_HideVisits_ProxyToResponder::Run(
bool in_success) { … }
class PageHandler_RemoveVisits_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PageHandler_RemoveVisits_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PageHandler_RemoveVisits_ProxyToResponder::Run(
bool in_success) { … }
bool PageHandlerStubDispatch::Accept(
PageHandler* impl,
mojo::Message* message) { … }
bool PageHandlerStubDispatch::AcceptWithResponder(
PageHandler* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPageHandlerValidationInfo[] = …;
bool PageHandlerRequestValidator::Accept(mojo::Message* message) { … }
bool PageHandlerResponseValidator::Accept(mojo::Message* message) { … }
const char Page::Name_[] = …;
Page::IPCStableHashFunction Page::MessageToMethodInfo_(mojo::Message& message) { … }
const char* Page::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t Page::OnClustersQueryResult_Sym::IPCStableHash() { … }
uint32_t Page::OnClusterImageUpdated_Sym::IPCStableHash() { … }
uint32_t Page::OnVisitsHidden_Sym::IPCStableHash() { … }
uint32_t Page::OnVisitsRemoved_Sym::IPCStableHash() { … }
uint32_t Page::OnHistoryDeleted_Sym::IPCStableHash() { … }
uint32_t Page::OnQueryChangedByUser_Sym::IPCStableHash() { … }
# endif
PageProxy::PageProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PageProxy::OnClustersQueryResult(
QueryResultPtr in_result) { … }
void PageProxy::OnClusterImageUpdated(
int32_t in_cluster_index, const ::GURL& in_image_url) { … }
void PageProxy::OnVisitsHidden(
std::vector<::history_clusters::mojom::URLVisitPtr> in_hidden_visits) { … }
void PageProxy::OnVisitsRemoved(
std::vector<::history_clusters::mojom::URLVisitPtr> in_removed_visits) { … }
void PageProxy::OnHistoryDeleted(
) { … }
void PageProxy::OnQueryChangedByUser(
const std::string& in_query) { … }
bool PageStubDispatch::Accept(
Page* impl,
mojo::Message* message) { … }
bool PageStubDispatch::AcceptWithResponder(
Page* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPageValidationInfo[] = …;
bool PageRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::history_clusters::mojom::QueryResult::DataView, ::history_clusters::mojom::QueryResultPtr>::Read(
::history_clusters::mojom::QueryResult::DataView input,
::history_clusters::mojom::QueryResultPtr* output) { … }
}
namespace history_clusters::mojom {
void PageHandlerInterceptorForTesting::OpenHistoryCluster(const ::GURL& url, ::ui::mojom::ClickModifiersPtr click_modifiers) { … }
void PageHandlerInterceptorForTesting::SetPage(::mojo::PendingRemote<Page> page) { … }
void PageHandlerInterceptorForTesting::ShowContextMenuForSearchbox(const std::string& query, const ::gfx::Point& point) { … }
void PageHandlerInterceptorForTesting::ShowContextMenuForURL(const ::GURL& url, const ::gfx::Point& point) { … }
void PageHandlerInterceptorForTesting::ShowSidePanelUI() { … }
void PageHandlerInterceptorForTesting::ToggleVisibility(bool visible, ToggleVisibilityCallback callback) { … }
void PageHandlerInterceptorForTesting::StartQueryClusters(const std::string& query, std::optional<::base::Time> begin_time, bool recluster) { … }
void PageHandlerInterceptorForTesting::LoadMoreClusters(const std::string& query) { … }
void PageHandlerInterceptorForTesting::HideVisits(std::vector<::history_clusters::mojom::URLVisitPtr> visits, HideVisitsCallback callback) { … }
void PageHandlerInterceptorForTesting::RemoveVisits(std::vector<::history_clusters::mojom::URLVisitPtr> visits, RemoveVisitsCallback callback) { … }
void PageHandlerInterceptorForTesting::OpenVisitUrlsInTabGroup(std::vector<::history_clusters::mojom::URLVisitPtr> visits, const std::optional<std::string>& tab_group_name) { … }
void PageHandlerInterceptorForTesting::RecordVisitAction(VisitAction visit_action, uint32_t visit_index, VisitType visit_type) { … }
void PageHandlerInterceptorForTesting::RecordRelatedSearchAction(RelatedSearchAction action, uint32_t visit_index) { … }
void PageHandlerInterceptorForTesting::RecordClusterAction(ClusterAction cluster_action, uint32_t cluster_index) { … }
void PageHandlerInterceptorForTesting::RecordToggledVisibility(bool visible) { … }
PageHandlerAsyncWaiter::PageHandlerAsyncWaiter(
PageHandler* proxy) : … { … }
PageHandlerAsyncWaiter::~PageHandlerAsyncWaiter() = default;
void PageHandlerAsyncWaiter::ToggleVisibility(
bool visible, bool* out_visible) { … }
bool PageHandlerAsyncWaiter::ToggleVisibility(
bool visible) { … }
void PageHandlerAsyncWaiter::HideVisits(
std::vector<::history_clusters::mojom::URLVisitPtr> visits, bool* out_success) { … }
bool PageHandlerAsyncWaiter::HideVisits(
std::vector<::history_clusters::mojom::URLVisitPtr> visits) { … }
void PageHandlerAsyncWaiter::RemoveVisits(
std::vector<::history_clusters::mojom::URLVisitPtr> visits, bool* out_success) { … }
bool PageHandlerAsyncWaiter::RemoveVisits(
std::vector<::history_clusters::mojom::URLVisitPtr> visits) { … }
void PageInterceptorForTesting::OnClustersQueryResult(QueryResultPtr result) { … }
void PageInterceptorForTesting::OnClusterImageUpdated(int32_t cluster_index, const ::GURL& image_url) { … }
void PageInterceptorForTesting::OnVisitsHidden(std::vector<::history_clusters::mojom::URLVisitPtr> hidden_visits) { … }
void PageInterceptorForTesting::OnVisitsRemoved(std::vector<::history_clusters::mojom::URLVisitPtr> removed_visits) { … }
void PageInterceptorForTesting::OnHistoryDeleted() { … }
void PageInterceptorForTesting::OnQueryChangedByUser(const std::string& query) { … }
PageAsyncWaiter::PageAsyncWaiter(
Page* proxy) : … { … }
PageAsyncWaiter::~PageAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif