OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_RESOLVED_SEARCH_TERM_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_RESOLVED_SEARCH_TERM_H_ |
6 #define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_RESOLVED_SEARCH_TERM_H_ | 6 #define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_RESOLVED_SEARCH_TERM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 | 11 |
12 // Encapsulates the various parts of a Resolved Search Term, which tells | 12 // Encapsulates the various parts of a Resolved Search Term, which tells |
13 // Contextual Search what to search for and how that term appears in the | 13 // Contextual Search what to search for and how that term appears in the |
14 // surrounding text. | 14 // surrounding text. |
15 struct ResolvedSearchTerm { | 15 struct ResolvedSearchTerm { |
16 public: | 16 public: |
17 explicit ResolvedSearchTerm(int response_code); | 17 explicit ResolvedSearchTerm(int response_code); |
18 ResolvedSearchTerm(bool is_invalid, | 18 ResolvedSearchTerm(bool is_invalid, |
19 int response_code, | 19 int response_code, |
20 const std::string& search_term, | 20 const std::string& search_term, |
21 const std::string& display_text, | 21 const std::string& display_text, |
22 const std::string& alternate_term, | 22 const std::string& alternate_term, |
23 const std::string& mid, | 23 const std::string& mid, |
24 bool prevent_preload, | 24 bool prevent_preload, |
25 int selection_start_adjust, | 25 int selection_start_adjust, |
26 int selection_end_adjust, | 26 int selection_end_adjust, |
27 const std::string& context_language); | 27 const std::string& context_language, |
| 28 const std::string& thumbnail_url); |
28 ~ResolvedSearchTerm(); | 29 ~ResolvedSearchTerm(); |
29 | 30 |
30 const bool is_invalid; | 31 const bool is_invalid; |
31 const int response_code; | 32 const int response_code; |
32 // Use strings, rather than just references, to keep this complete. | 33 // Use strings, rather than just references, to keep this complete. |
33 const std::string search_term; | 34 const std::string search_term; |
34 const std::string display_text; | 35 const std::string display_text; |
35 const std::string alternate_term; | 36 const std::string alternate_term; |
36 const std::string mid; // Mid (entity ID), or empty. | 37 const std::string mid; // Mid (entity ID), or empty. |
37 const bool prevent_preload; | 38 const bool prevent_preload; |
38 const int selection_start_adjust; | 39 const int selection_start_adjust; |
39 const int selection_end_adjust; | 40 const int selection_end_adjust; |
40 const std::string context_language; | 41 const std::string context_language; |
| 42 const std::string thumbnail_url; |
41 | 43 |
42 DISALLOW_COPY_AND_ASSIGN(ResolvedSearchTerm); | 44 DISALLOW_COPY_AND_ASSIGN(ResolvedSearchTerm); |
43 }; | 45 }; |
44 | 46 |
45 #endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_RESOLVED_SEARCH_TERM_H_ | 47 #endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_RESOLVED_SEARCH_TERM_H_ |
OLD | NEW |