[TTS] Add a Java Context linked to existing native
Refactor Contextual Search to use a Java Context linked to the
native Context we've had for a while.
Update the native context have only private data members.
Also fix some minor bugs regarding the panel not updating when
a retap is done, and expanding the selection when it's been
changed.
Additional refactoring includes changing the API to the native
Contextual Search Manager to have StartSearchTermResolutionRequest
not automatically gather surrounding text -- that call must now be
done separately.
Also use WebContents instead of ContentViewCore, and some other
cleanup.
BUG=692824,699305,693297
Review-Url: https://codereview.chromium.org/2706333002
Cr-Commit-Position: refs/heads/master@{#456087}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index a24533f..9cdec6b 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3985,6 +3985,7 @@
"../android/java/src/org/chromium/chrome/browser/compositor/scene_layer/ToolbarSceneLayer.java",
"../android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java",
"../android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuParams.java",
+ "../android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchContext.java",
"../android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java",
"../android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java",
"../android/java/src/org/chromium/chrome/browser/contextualsearch/CtrSuppression.java",