#include "components/omnibox/browser/voice_suggest_provider.h"
#include <string>
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_match.h"
#include "components/omnibox/browser/autocomplete_match_classification.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
#include "third_party/omnibox_proto/navigational_intent.pb.h"
#include "third_party/omnibox_proto/types.pb.h"
namespace {
constexpr const int kMaxVoiceSuggestionScore = …;
constexpr const int kMinVoiceSuggestionScore = …;
constexpr const float kConfidenceAlternativesCutoff = …;
constexpr const float kConfidenceRelevanceCutoff = …;
constexpr const int kMaxVoiceMatchesToOffer = …;
constexpr int ConfidenceScoreToSuggestionScore(float confidence_score) { … }
}
VoiceSuggestProvider::VoiceSuggestProvider(AutocompleteProviderClient* client)
: … { … }
VoiceSuggestProvider::~VoiceSuggestProvider() = default;
void VoiceSuggestProvider::Start(const AutocompleteInput& input,
bool minimal_changes) { … }
bool VoiceSuggestProvider::ShouldAppendExtraParams(
const SearchSuggestionParser::SuggestResult& result) const { … }
void VoiceSuggestProvider::RecordDeletionResult(bool success) { … }
void VoiceSuggestProvider::Stop(bool clear_cached_results,
bool due_to_user_inactivity) { … }
void VoiceSuggestProvider::ClearCache() { … }
void VoiceSuggestProvider::AddVoiceSuggestion(std::u16string voice_match,
float confidence_score) { … }