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

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

Issue 2211353002: [TTS] Gather surrounding text on Tap before any UX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unused code and consolidated two functions, updated comments. Created 4 years, 3 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_CONTEXTUAL_SEARCH_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_CONTEXT_H_
6 #define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_CONTEXT_H_ 6 #define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 // Encapsulates key parts of a Contextual Search Context, including surrounding 13 // Encapsulates key parts of a Contextual Search Context, including surrounding
14 // text. 14 // text.
15 struct ContextualSearchContext { 15 struct ContextualSearchContext {
16 public: 16 public:
17 ContextualSearchContext(const std::string& selected_text, 17 ContextualSearchContext(const std::string& selected_text,
18 const bool use_resolved_search_term, 18 const bool use_resolved_search_term,
19 const GURL& page_url, 19 const GURL& page_url,
20 const std::string& encoding); 20 const std::string& encoding);
21 ContextualSearchContext(const bool use_resolved_search_term,
22 const GURL& page_url,
23 const std::string& encoding);
21 ~ContextualSearchContext(); 24 ~ContextualSearchContext();
22 25
23 const std::string selected_text;
24 const bool use_resolved_search_term; 26 const bool use_resolved_search_term;
25 const GURL page_url; 27 const GURL page_url;
26 const std::string encoding; 28 const std::string encoding;
27 29
30 std::string selected_text;
28 base::string16 surrounding_text; 31 base::string16 surrounding_text;
29 int start_offset; 32 int start_offset;
30 int end_offset; 33 int end_offset;
31 34
32 DISALLOW_COPY_AND_ASSIGN(ContextualSearchContext); 35 DISALLOW_COPY_AND_ASSIGN(ContextualSearchContext);
33 }; 36 };
34 37
35 #endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_CONTEXT_H_ 38 #endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/android/contextualsearch/contextual_search_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698