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

Unified Diff: chrome/browser/android/contextualsearch/contextual_search_delegate.h

Issue 1205033005: Adds selection expansion support for Contextual Search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed java tests Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/contextualsearch/contextual_search_delegate.h
diff --git a/chrome/browser/android/contextualsearch/contextual_search_delegate.h b/chrome/browser/android/contextualsearch/contextual_search_delegate.h
index aeaa29845062f940796d0ad863f122e04a489630..8714afe5da0cd33b116b2c57ca0be7ae678592a4 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate.h
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate.h
@@ -9,6 +9,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/values.h"
#include "chrome/browser/android/contextualsearch/contextual_search_context.h"
#include "content/public/browser/android/content_view_core.h"
#include "net/url_request/url_fetcher_delegate.h"
@@ -26,10 +27,14 @@ class ContextualSearchDelegate
: public net::URLFetcherDelegate,
public base::SupportsWeakPtr<ContextualSearchDelegate> {
public:
- typedef base::Callback<
- void(bool, int, const std::string&, const std::string&,
- const std::string&, bool)>
- SearchTermResolutionCallback;
+ typedef base::Callback<void(bool,
+ int,
+ const std::string&,
+ const std::string&,
+ const std::string&,
+ bool,
+ int,
+ int)> SearchTermResolutionCallback;
typedef base::Callback<
void(const std::string&, const std::string&)> SurroundingTextCallback;
typedef base::Callback<
@@ -85,6 +90,8 @@ class ContextualSearchDelegate
FRIEND_TEST_ALL_PREFIXES(ContextualSearchDelegateTest,
SurroundingTextNoBeforeText);
FRIEND_TEST_ALL_PREFIXES(ContextualSearchDelegateTest,
+ ExtractMentionsStartEnd);
+ FRIEND_TEST_ALL_PREFIXES(ContextualSearchDelegateTest,
SurroundingTextForIcing);
FRIEND_TEST_ALL_PREFIXES(ContextualSearchDelegateTest,
SurroundingTextForIcingNegativeLimit);
@@ -148,7 +155,13 @@ class ContextualSearchDelegate
std::string* search_term,
std::string* display_text,
std::string* alternate_term,
- std::string* prevent_preload);
+ std::string* prevent_preload,
+ int* mention_start,
+ int* mention_end);
+
+ void ExtractMentionsStartEnd(const base::ListValue& mentions_list,
+ int* startResult,
+ int* endResult);
// Returns the surrounding size to use for the search term resolution
// request.

Powered by Google App Engine
This is Rietveld 408576698