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

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: Created 5 years 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 398840f7e3f0c95e0cdc2552806909b9583c6ad0..0033a450660a92160d7070eddebd11118847cc60 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_manager.h
+++ b/chrome/browser/android/contextualsearch/contextual_search_manager.h
@@ -9,15 +9,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_ui_handle.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::ContextualSearchUIHandle {
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);
@@ -57,6 +59,14 @@ class ContextualSearchManager {
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
+ // Enables the Contextual Search JS API for the given |ContentViewCore|.
+ void AddViewForContextualSearchApi(JNIEnv* env,
pedro (no code reviews) 2015/12/22 23:15:39 Nit: It would be nice being consistent with the te
Donn Denman 2016/01/08 18:59:09 Done.
+ jobject obj,
+ jobject j_overlay_content_view_core);
+
+ // ContextualSearchUIHandle overrides:
+ void SetCaption(std::string caption, bool does_answer) override;
+
private:
void OnSearchTermResolutionResponse(
const ResolvedSearchTerm& resolved_search_term);

Powered by Google App Engine
This is Rietveld 408576698