Index: chrome/browser/android/contextualsearch/contextual_search_context.h |
diff --git a/chrome/browser/android/contextualsearch/contextual_search_context.h b/chrome/browser/android/contextualsearch/contextual_search_context.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d6e6c46819d9bdda209089f243aa1ea26dd677d1 |
--- /dev/null |
+++ b/chrome/browser/android/contextualsearch/contextual_search_context.h |
@@ -0,0 +1,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/basictypes.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_ |