#include "components/continuous_search/renderer/search_result_extractor_impl.h"
#include <utility>
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_runner.h"
#include "components/continuous_search/common/title_validator.h"
#include "components/continuous_search/renderer/config.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_element.h"
#include "third_party/blink/public/web/web_element_collection.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "url/gurl.h"
namespace continuous_search {
namespace {
bool ExtractResultCards(blink::WebElement node, mojom::ResultGroupPtr& group) { … }
bool ExtractResults(blink::WebDocument document,
mojom::CategoryResultsPtr& results) { … }
bool ExtractRelatedSearches(blink::WebDocument document,
mojom::CategoryResultsPtr& results) { … }
}
SearchResultExtractorImpl* SearchResultExtractorImpl::Create(
content::RenderFrame* render_frame) { … }
SearchResultExtractorImpl::SearchResultExtractorImpl(
content::RenderFrame* render_frame)
: … { … }
SearchResultExtractorImpl::~SearchResultExtractorImpl() = default;
void SearchResultExtractorImpl::ExtractCurrentSearchResults(
const std::vector<mojom::ResultType>& result_types,
ExtractCurrentSearchResultsCallback callback) { … }
void SearchResultExtractorImpl::OnDestruct() { … }
void SearchResultExtractorImpl::BindSearchResultExtractor(
mojo::PendingAssociatedReceiver<mojom::SearchResultExtractor> receiver) { … }
}