Chromium Code Reviews| Index: chrome/browser/search_engines/template_url.h |
| diff --git a/chrome/browser/search_engines/template_url.h b/chrome/browser/search_engines/template_url.h |
| index 67f27cacea1cc0e39eaa7ab49d562489c9c2ea45..abe3ea336316c1d84bcc96c34acf68963b0d1ff4 100644 |
| --- a/chrome/browser/search_engines/template_url.h |
| +++ b/chrome/browser/search_engines/template_url.h |
| @@ -53,6 +53,7 @@ class TemplateURLRef { |
| INSTANT, |
| IMAGE, |
| NEW_TAB, |
| + CONTEXTUAL_SEARCH, |
| INDEXED |
| }; |
| @@ -95,6 +96,21 @@ class TemplateURLRef { |
| // to align the preview contents with the omnibox. |
| int omnibox_start_margin; |
| + // The version of contextual search. |
| + int contextual_search_version; |
| + |
| + // Offset into contextual_search_content of the start of the user selection. |
| + int contextual_search_start; |
| + |
| + // Offset into contextual_search_content of the end of the user selection. |
| + int contextual_search_end; |
| + |
| + // The text including and surrounding the user selection. |
| + std::string contextual_search_content; |
| + |
| + // The encoding of contextual_search_content. |
| + std::string contextual_search_encoding; |
| + |
|
pedro (no code reviews)
2014/06/02 17:39:51
What about the page's URL?
donnd
2014/06/02 18:09:46
+1
jeremycho
2014/06/02 21:24:08
Done.
|
| // The URL of the current webpage to be used for experimental zero-prefix |
| // suggestions. |
| std::string current_page_url; |
| @@ -271,6 +287,11 @@ class TemplateURLRef { |
| GOOGLE_INSTANT_EXTENDED_ENABLED, |
| GOOGLE_NTP_IS_THEMED, |
| GOOGLE_OMNIBOX_START_MARGIN, |
| + GOOGLE_CONTEXTUAL_SEARCH_VERSION, |
| + GOOGLE_CONTEXTUAL_SEARCH_START, |
| + GOOGLE_CONTEXTUAL_SEARCH_END, |
| + GOOGLE_CONTEXTUAL_SEARCH_CONTENT, |
| + GOOGLE_CONTEXTUAL_SEARCH_ENCODING, |
| GOOGLE_ORIGINAL_QUERY_FOR_SUGGESTION, |
| GOOGLE_PAGE_CLASSIFICATION, |
| GOOGLE_RLZ, |
| @@ -444,6 +465,7 @@ struct TemplateURLData { |
| std::string instant_url; |
| std::string image_url; |
| std::string new_tab_url; |
| + std::string contextual_search_url; |
| // The following post_params are comma-separated lists used to specify the |
| // post parameters for the corresponding URL. |
| @@ -591,6 +613,9 @@ class TemplateURL { |
| const std::string& instant_url() const { return data_.instant_url; } |
| const std::string& image_url() const { return data_.image_url; } |
| const std::string& new_tab_url() const { return data_.new_tab_url; } |
| + const std::string& contextual_search_url() const { |
| + return data_.contextual_search_url; |
| + } |
| const std::string& search_url_post_params() const { |
| return data_.search_url_post_params; |
| } |
| @@ -646,6 +671,9 @@ class TemplateURL { |
| const TemplateURLRef& instant_url_ref() const { return instant_url_ref_; } |
| const TemplateURLRef& image_url_ref() const { return image_url_ref_; } |
| const TemplateURLRef& new_tab_url_ref() const { return new_tab_url_ref_; } |
| + const TemplateURLRef& contextual_search_url_ref() const { |
| + return contextual_search_url_ref_; |
| + } |
| // Returns true if |url| supports replacement. |
| bool SupportsReplacement() const; |
| @@ -776,6 +804,7 @@ class TemplateURL { |
| TemplateURLRef instant_url_ref_; |
| TemplateURLRef image_url_ref_; |
| TemplateURLRef new_tab_url_ref_; |
| + TemplateURLRef contextual_search_url_ref_; |
| scoped_ptr<AssociatedExtensionInfo> extension_info_; |
| // TODO(sky): Add date last parsed OSD file. |