Chromium Code Reviews| 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..b0d5c5bbbc444c84bfc06771dc268e298924d8e7 100644 |
| --- a/components/omnibox/browser/autocomplete_input.h |
| +++ b/components/omnibox/browser/autocomplete_input.h |
| @@ -37,6 +37,9 @@ class AutocompleteInput { |
| // Query refinement is only used by mobile ports, so only these set |
| // |current_url| to a non-empty string. |
| // |
| + // |current_title| is the title of the page the user is viewing when accessing |
| + // the omnibox. |
|
Mark P
2017/04/12 05:07:56
Please add why this variable is needed, otherwise
gcomanici
2017/04/12 16:16:30
Done.
|
| + // |
| // |current_page_classification| represents the type of page the user is |
| // viewing and manner in which the user is accessing the omnibox; it's |
| // more than simply the URL. It includes, for example, whether the page |
| @@ -72,6 +75,7 @@ class AutocompleteInput { |
| size_t cursor_position, |
| const std::string& desired_tld, |
| const GURL& current_url, |
| + const base::string16& current_title, |
| metrics::OmniboxEventProto::PageClassification |
| current_page_classification, |
| bool prevent_inline_autocomplete, |
| @@ -147,6 +151,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 +217,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_; |