| Index: components/omnibox/browser/physical_web_provider.h
|
| diff --git a/components/omnibox/browser/physical_web_provider.h b/components/omnibox/browser/physical_web_provider.h
|
| index f67f0c45d77eb871fb1f7f1af1d173109baa0306..62158fe091fb9ca43f31015f00e0b8e00c442be8 100644
|
| --- a/components/omnibox/browser/physical_web_provider.h
|
| +++ b/components/omnibox/browser/physical_web_provider.h
|
| @@ -6,6 +6,7 @@
|
| #define COMPONENTS_OMNIBOX_BROWSER_PHYSICAL_WEB_PROVIDER_H_
|
|
|
| #include "base/macros.h"
|
| +#include "components/bookmarks/browser/titled_url_match.h"
|
| #include "components/omnibox/browser/autocomplete_input.h"
|
| #include "components/omnibox/browser/autocomplete_provider.h"
|
|
|
| @@ -43,11 +44,21 @@ class PhysicalWebProvider : public AutocompleteProvider {
|
| HistoryURLProvider* history_url_provider);
|
| ~PhysicalWebProvider() override;
|
|
|
| - // Adds a separate match item to |matches_| for each nearby URL in
|
| - // |metadata_list|, up to the maximum number of matches allowed. If the total
|
| - // number of nearby URLs exceeds this limit, one match is used for an overflow
|
| - // item.
|
| - void ConstructMatches(base::ListValue* metadata_list);
|
| + // When the user has focused the omnibox but not yet entered any text (i.e.,
|
| + // the Zero Suggest case), calling this method adds a separate match item to
|
| + // |matches_| for each nearby URL in |metadata_list|, up to the maximum number
|
| + // of matches allowed. If the total number of nearby URLs exceeds this limit,
|
| + // one match is used for an overflow item.
|
| + void ConstructZeroSuggestMatches(
|
| + std::unique_ptr<base::ListValue> metadata_list);
|
| +
|
| + // When the user has entered text into the omnibox (i.e., the Query Suggest
|
| + // case), calling this method adds a separate match item to |matches_| for
|
| + // each nearby URL in |metadata_list| that matches all of the query terms in
|
| + // |input|, up to the maximum number of matches allowed.
|
| + void ConstructQuerySuggestMatches(
|
| + std::unique_ptr<base::ListValue> metadata_list,
|
| + const AutocompleteInput& input);
|
|
|
| // Adds an overflow match item to |matches_| with a relevance score equal to
|
| // |relevance| and a label indicating there are |additional_url_count| more
|
| @@ -68,6 +79,22 @@ class PhysicalWebProvider : public AutocompleteProvider {
|
| // matches.
|
| size_t nearby_url_count_;
|
|
|
| + // If true, provide suggestions when the user has focused the omnibox but has
|
| + // not typed anything.
|
| + bool zero_suggest_enabled_;
|
| +
|
| + // If true, provide suggestions when the user has entered a query into the
|
| + // omnibox.
|
| + bool after_typing_enabled_;
|
| +
|
| + // The base relevance score for Physical Web URL suggestions when the user has
|
| + // not typed anything into the omnibox.
|
| + int zero_suggest_base_relevance_;
|
| +
|
| + // The base relevance score for Physical Web URL suggestions after the user
|
| + // has typed a query into the omnibox.
|
| + int after_typing_base_relevance_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PhysicalWebProvider);
|
| };
|
|
|
|
|