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

Side by Side Diff: chrome/browser/android/contextualsearch/resolved_search_term.h

Issue 2440843002: [Contextual Search] Pipe basic quick action data from C++ to Java (Closed)
Patch Set: [Contextual Search] Pipe basic quick action data from C++ to Java Created 4 years, 2 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
OLDNEW
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 const std::string& thumbnail_url,
29 const std::string& caption); 29 const std::string& caption,
30 const std::string& quick_action_uri,
31 const std::string& quick_action_category);
30 ~ResolvedSearchTerm(); 32 ~ResolvedSearchTerm();
31 33
32 const bool is_invalid; 34 const bool is_invalid;
33 const int response_code; 35 const int response_code;
34 // Use strings, rather than just references, to keep this complete. 36 // Use strings, rather than just references, to keep this complete.
35 const std::string search_term; 37 const std::string search_term;
36 const std::string display_text; 38 const std::string display_text;
37 const std::string alternate_term; 39 const std::string alternate_term;
38 const std::string mid; // Mid (entity ID), or empty. 40 const std::string mid; // Mid (entity ID), or empty.
39 const bool prevent_preload; 41 const bool prevent_preload;
40 const int selection_start_adjust; 42 const int selection_start_adjust;
41 const int selection_end_adjust; 43 const int selection_end_adjust;
42 const std::string context_language; 44 const std::string context_language;
43 const std::string thumbnail_url; 45 const std::string thumbnail_url;
44 const std::string caption; 46 const std::string caption;
47 const std::string quick_action_uri;
48 const std::string quick_action_category;
45 49
46 DISALLOW_COPY_AND_ASSIGN(ResolvedSearchTerm); 50 DISALLOW_COPY_AND_ASSIGN(ResolvedSearchTerm);
47 }; 51 };
48 52
49 #endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_RESOLVED_SEARCH_TERM_H_ 53 #endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_RESOLVED_SEARCH_TERM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698