#include "components/omnibox/browser/open_tab_provider.h"
#include "base/i18n/case_conversion.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_match.h"
#include "components/omnibox/browser/autocomplete_match_classification.h"
#include "components/omnibox/browser/in_memory_url_index_types.h"
#include "components/omnibox/browser/keyword_provider.h"
#include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/omnibox/browser/scoring_functor.h"
#include "components/omnibox/browser/tab_matcher.h"
#include "components/query_parser/query_parser.h"
#include "components/search_engines/template_url.h"
#include "components/strings/grit/components_strings.h"
#include "components/url_formatter/url_formatter.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
#include "content/public/browser/web_contents.h"
#endif
namespace {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
int Score(const query_parser::QueryNodeVector& input_query_nodes,
const std::u16string& title,
const GURL& url) { … }
#endif
}
OpenTabProvider::OpenTabProvider(AutocompleteProviderClient* client)
: … { … }
OpenTabProvider::~OpenTabProvider() = default;
void OpenTabProvider::Start(const AutocompleteInput& input,
bool minimal_changes) { … }
AutocompleteMatch OpenTabProvider::CreateOpenTabMatch(
const AutocompleteInput& input,
const std::u16string& title,
const GURL& url,
int score,
const TemplateURL* template_url) { … }
AutocompleteMatch OpenTabProvider::CreateNullResultMessageMatch(
const AutocompleteInput& input,
const TemplateURL* template_url) { … }