Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(824)

Unified Diff: components/omnibox/autocomplete_provider.h

Issue 836213002: Assume all providers may give zero suggest responses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation issue in athena Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/omnibox/autocomplete_provider.h
diff --git a/components/omnibox/autocomplete_provider.h b/components/omnibox/autocomplete_provider.h
index 96102928a62bb1f3153d3a541f0d7916e0296a2d..c86c274ed9f6ac8effe7671b674a1a46044979ae 100644
--- a/components/omnibox/autocomplete_provider.h
+++ b/components/omnibox/autocomplete_provider.h
@@ -156,7 +156,14 @@ class AutocompleteProvider
// |minimal_changes| is an optimization that lets the provider do less work
// when the |input|'s text hasn't changed. See the body of
// OmniboxPopupModel::StartAutocomplete().
- virtual void Start(const AutocompleteInput& input, bool minimal_changes) = 0;
+ //
+ // |called_due_to_focus| is true when Start() is being called in response to
+ // the omnibox being focused, instead of due to e.g. user input changes. Most
+ // providers should not provide matches in this case. Providers which want to
+ // display matches on focus can use this flag to know when they can do so.
+ virtual void Start(const AutocompleteInput& input,
+ bool minimal_changes,
+ bool called_due_to_focus) = 0;
// Called when a provider must not make any more callbacks for the current
// query. This will be called regardless of whether the provider is already
@@ -197,10 +204,6 @@ class AutocompleteProvider
// Returns this provider's type.
Type type() const { return type_; }
- // Returns whether the provider wants to provide matches in response to the
- // omnibox being focused.
- virtual bool ProvidesMatchesOnOmniboxFocus() const;
-
// Returns a string describing this provider's type.
const char* GetName() const;
« no previous file with comments | « chrome/browser/autocomplete/zero_suggest_provider_unittest.cc ('k') | components/omnibox/autocomplete_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698