blob: 325ec6d7b2d15c200825c063f6518c5f181d167e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_CONTEXT_H_
#define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_CONTEXT_H_
#include <string>
#include "base/macros.h"
#include "url/gurl.h"
// Encapsulates key parts of a Contextual Search Context, including surrounding
// text.
struct ContextualSearchContext {
public:
ContextualSearchContext(const std::string& selected_text,
const bool use_resolved_search_term,
const GURL& page_url,
const std::string& encoding);
~ContextualSearchContext();
const std::string selected_text;
const bool use_resolved_search_term;
const GURL page_url;
const std::string encoding;
base::string16 surrounding_text;
int start_offset;
int end_offset;
DISALLOW_COPY_AND_ASSIGN(ContextualSearchContext);
};
#endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_CONTEXT_H_
|