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

Unified Diff: components/omnibox/browser/autocomplete_input.h

Issue 2738003002: Add title to current page in zero suggest. (Closed)
Patch Set: Add flag to show title for current URL suggestion. Created 3 years, 9 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/browser/autocomplete_input.h
diff --git a/components/omnibox/browser/autocomplete_input.h b/components/omnibox/browser/autocomplete_input.h
index d6281f86c6d0d12b6770debd44622600503a5001..cff85a896a40c6c1eaafde571c73e346201cd241 100644
--- a/components/omnibox/browser/autocomplete_input.h
+++ b/components/omnibox/browser/autocomplete_input.h
@@ -72,6 +72,7 @@ class AutocompleteInput {
size_t cursor_position,
const std::string& desired_tld,
const GURL& current_url,
+ const base::string16& current_title,
Mark P 2017/04/10 22:38:02 Please revise the function comment.
gcomanici 2017/04/11 20:51:41 Done.
metrics::OmniboxEventProto::PageClassification
current_page_classification,
bool prevent_inline_autocomplete,
@@ -147,6 +148,10 @@ class AutocompleteInput {
// The current URL, or an invalid GURL if query refinement is not desired.
const GURL& current_url() const { return current_url_; }
+ // The title of the current page, corresponding to the current URL, or empty
+ // if this is not available.
+ const base::string16& current_title() const { return current_title_; }
+
// The type of page that is currently behind displayed and how it is
// displayed (e.g., with search term replacement or without).
metrics::OmniboxEventProto::PageClassification current_page_classification()
@@ -209,6 +214,7 @@ class AutocompleteInput {
base::string16 text_;
size_t cursor_position_;
GURL current_url_;
+ base::string16 current_title_;
metrics::OmniboxEventProto::PageClassification current_page_classification_;
metrics::OmniboxInputType::Type type_;
url::Parsed parts_;

Powered by Google App Engine
This is Rietveld 408576698