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

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

Issue 1532743002: [Contextual Search] Use Mojo API for Quick Answers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated a comment. Created 4 years, 11 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_manager.h
diff --git a/chrome/browser/android/contextualsearch/contextual_search_manager.h b/chrome/browser/android/contextualsearch/contextual_search_manager.h
index 3df2d5122f3f65de8ba268d40ac3881816e60f1a..4e9e323b8f7022d574fe104388c29aa241338bc0 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_manager.h
+++ b/chrome/browser/android/contextualsearch/contextual_search_manager.h
@@ -12,15 +12,17 @@
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/android/contextualsearch/contextual_search_context.h"
#include "chrome/browser/android/contextualsearch/contextual_search_delegate.h"
+#include "components/contextual_search/browser/contextual_search_js_api_handler.h"
// Manages the native extraction and request logic for Contextual Search,
// and interacts with the Java ContextualSearchManager for UX.
// Most of the work is done by the associated ContextualSearchDelegate.
-class ContextualSearchManager {
+class ContextualSearchManager
+ : public contextual_search::ContextualSearchJsApiHandler {
public:
// Constructs a native manager associated with the Java manager.
ContextualSearchManager(JNIEnv* env, jobject obj);
- virtual ~ContextualSearchManager();
+ ~ContextualSearchManager() override;
// Called by the Java ContextualSearchManager when it is being destroyed.
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
@@ -60,6 +62,15 @@ class ContextualSearchManager {
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
+ // Enables the Contextual Search JS API for the given |ContentViewCore|.
+ void EnableContextualSearchJsApiForOverlay(
+ JNIEnv* env,
+ jobject obj,
+ jobject j_overlay_content_view_core);
+
+ // ContextualSearchJsApiHandler overrides:
+ void SetCaption(std::string caption, bool does_answer) override;
+
private:
void OnSearchTermResolutionResponse(
const ResolvedSearchTerm& resolved_search_term);
« no previous file with comments | « chrome/browser/android/contextualsearch/DEPS ('k') | chrome/browser/android/contextualsearch/contextual_search_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698