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

Side by Side Diff: components/search_engines/template_url.h

Issue 424013002: Update the contextual search API to include a parameter specifying whether the server shoudl return… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments. Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/search_engines/template_url.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 struct ContextualSearchParams { 75 struct ContextualSearchParams {
76 ContextualSearchParams(); 76 ContextualSearchParams();
77 ContextualSearchParams(const int version, 77 ContextualSearchParams(const int version,
78 const size_t start, 78 const size_t start,
79 const size_t end, 79 const size_t end,
80 const std::string& selection, 80 const std::string& selection,
81 const std::string& content, 81 const std::string& content,
82 const std::string& base_page_url, 82 const std::string& base_page_url,
83 const std::string& encoding); 83 const std::string& encoding);
84 ContextualSearchParams(const int version,
Peter Kasting 2014/07/31 05:14:03 Don't add this in addition to the other constructo
jeremycho 2014/07/31 20:29:08 The existing constructor gets called by Clank so i
Peter Kasting 2014/07/31 20:33:49 OK. Consider a TODO about that if it will take mo
jeremycho 2014/07/31 21:08:39 Done.
85 const size_t start,
86 const size_t end,
87 const std::string& selection,
88 const std::string& content,
89 const std::string& base_page_url,
90 const std::string& encoding,
91 const bool resolve);
84 ~ContextualSearchParams(); 92 ~ContextualSearchParams();
85 93
86 // The version of contextual search. 94 // The version of contextual search.
87 int version; 95 int version;
88 96
89 // Offset into the page content of the start of the user selection. 97 // Offset into the page content of the start of the user selection.
90 size_t start; 98 size_t start;
91 99
92 // Offset into the page content of the end of the user selection. 100 // Offset into the page content of the end of the user selection.
93 size_t end; 101 size_t end;
94 102
95 // The user selection. 103 // The user selection.
96 std::string selection; 104 std::string selection;
97 105
98 // The text including and surrounding the user selection. 106 // The text including and surrounding the user selection.
99 std::string content; 107 std::string content;
100 108
101 // The URL of the page containing the user selection. 109 // The URL of the page containing the user selection.
102 std::string base_page_url; 110 std::string base_page_url;
103 111
104 // The encoding of content. 112 // The encoding of content.
105 std::string encoding; 113 std::string encoding;
114
115 // Whether to return a resolved search term.
Peter Kasting 2014/07/31 05:14:03 What does "return a resolved search term" mean? T
jeremycho 2014/07/31 20:29:08 Clarified.
116 bool resolve;
106 }; 117 };
107 118
108 // The search terms (query). 119 // The search terms (query).
109 base::string16 search_terms; 120 base::string16 search_terms;
110 121
111 // The original (input) query. 122 // The original (input) query.
112 base::string16 original_query; 123 base::string16 original_query;
113 124
114 // The type the original input query was identified as. 125 // The type the original input query was identified as.
115 metrics::OmniboxInputType::Type input_type; 126 metrics::OmniboxInputType::Type input_type;
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 TemplateURLRef new_tab_url_ref_; 715 TemplateURLRef new_tab_url_ref_;
705 TemplateURLRef contextual_search_url_ref_; 716 TemplateURLRef contextual_search_url_ref_;
706 scoped_ptr<AssociatedExtensionInfo> extension_info_; 717 scoped_ptr<AssociatedExtensionInfo> extension_info_;
707 718
708 // TODO(sky): Add date last parsed OSD file. 719 // TODO(sky): Add date last parsed OSD file.
709 720
710 DISALLOW_COPY_AND_ASSIGN(TemplateURL); 721 DISALLOW_COPY_AND_ASSIGN(TemplateURL);
711 }; 722 };
712 723
713 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 724 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
OLDNEW
« no previous file with comments | « no previous file | components/search_engines/template_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698