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

Unified Diff: chrome/browser/autocomplete/search_provider.h

Issue 58003005: Modify Entity Suggestion support and Add Profile Suggest support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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: chrome/browser/autocomplete/search_provider.h
diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h
index 30e601cebd44da85b30f91022f326a4ec04b063d..4f832a12661765a79d3fed034bc6df4ee2d252a8 100644
--- a/chrome/browser/autocomplete/search_provider.h
+++ b/chrome/browser/autocomplete/search_provider.h
@@ -84,8 +84,10 @@ class SearchProvider : public AutocompleteProvider,
int relevance,
AutocompleteMatch::Type type,
bool is_keyword,
- const string16& match_contents,
+ const string16& title,
+ const ACMatchClassifications& title_class,
const string16& annotation,
+ const ACMatchClassifications& annotation_class,
const TemplateURL* template_url,
const string16& query_string,
const std::string& suggest_query_params,
@@ -224,8 +226,11 @@ class SearchProvider : public AutocompleteProvider,
class SuggestResult : public Result {
public:
SuggestResult(const string16& suggestion,
- const string16& match_contents,
+ AutocompleteMatchType::Type type,
+ const string16& title,
+ ACMatchClassifications title_class,
const string16& annotation,
+ ACMatchClassifications annotation_class,
const std::string& suggest_query_params,
bool from_keyword_provider,
int relevance,
@@ -234,8 +239,13 @@ class SearchProvider : public AutocompleteProvider,
virtual ~SuggestResult();
const string16& suggestion() const { return suggestion_; }
- const string16& match_contents() const { return match_contents_; }
+ AutocompleteMatchType::Type type() const { return type_; }
+ const string16& title() const { return title_; }
+ const ACMatchClassifications& title_class() const { return title_class_; }
const string16& annotation() const { return annotation_; }
+ const ACMatchClassifications& annotation_class() const {
+ return annotation_class_;
+ }
const std::string& suggest_query_params() const {
return suggest_query_params_;
}
@@ -251,13 +261,17 @@ class SearchProvider : public AutocompleteProvider,
// The search terms to be used for this suggestion.
string16 suggestion_;
+ AutocompleteMatchType::Type type_;
+
// The contents to be displayed in the autocomplete match.
- string16 match_contents_;
+ string16 title_;
+ ACMatchClassifications title_class_;
- // Optional annotation for the |match_contents_| for disambiguation.
+ // Optional annotation for the |title_| for disambiguation.
// This may be displayed in the autocomplete match contents, but is defined
// separately to facilitate different formatting.
string16 annotation_;
+ ACMatchClassifications annotation_class_;
// Optional additional parameters to be added to the search URL.
std::string suggest_query_params_;
@@ -495,8 +509,10 @@ class SearchProvider : public AutocompleteProvider,
const std::string& metadata,
AutocompleteMatch::Type type,
bool is_keyword,
- const string16& match_contents,
+ const string16& title,
+ const ACMatchClassifications& title_class,
const string16& annotation,
+ const ACMatchClassifications& annotation_class,
const string16& query_string,
int accepted_suggestion,
const std::string& suggest_query_params,

Powered by Google App Engine
This is Rietveld 408576698