#include "calculator_provider.h"
#include <limits>
#include <vector>
#include "base/check.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_match.h"
#include "components/omnibox/browser/autocomplete_match_type.h"
#include "components/omnibox/browser/autocomplete_provider.h"
#include "components/omnibox/browser/autocomplete_provider_client.h"
#include "components/omnibox/browser/autocomplete_provider_listener.h"
#include "components/omnibox/browser/omnibox_feature_configs.h"
#include "components/omnibox/browser/provider_state_service.h"
#include "components/omnibox/browser/search_provider.h"
CalculatorProvider::CalculatorProvider(AutocompleteProviderClient* client,
AutocompleteProviderListener* listener,
SearchProvider* search_provider)
: … { … }
CalculatorProvider::~CalculatorProvider() = default;
void CalculatorProvider::Start(const AutocompleteInput& input,
bool minimal_changes) { … }
void CalculatorProvider::Stop(bool clear_cached_results,
bool due_to_user_inactivity) { … }
void CalculatorProvider::DeleteMatch(const AutocompleteMatch& match) { … }
void CalculatorProvider::OnProviderUpdate(
bool updated_matches,
const AutocompleteProvider* provider) { … }
void CalculatorProvider::UpdateFromSearch() { … }
void CalculatorProvider::AddMatchToCache(AutocompleteMatch match) { … }
void CalculatorProvider::AddMatches() { … }
bool CalculatorProvider::Show() { … }
std::vector<ProviderStateService::CachedAutocompleteMatch>&
CalculatorProvider::Cache() { … }