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

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

Issue 1354763003: [Contextual Search] Trigger the translation one-box. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comment about test infrastructure needing to be updated when shifting to new API. Created 5 years, 1 month 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 08a2e3df493f79e8c4ef41dc44528474734c8492..a29dc63860f23d08672a6633cd656306b3a61a62 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_manager.h
+++ b/chrome/browser/android/contextualsearch/contextual_search_manager.h
@@ -46,16 +46,17 @@ class ContextualSearchManager {
jobject j_base_content_view_core,
jboolean j_may_send_base_page_url);
+ // Gets the target language for translation purposes.
+ base::android::ScopedJavaLocalRef<jstring> GetTargetLanguage(JNIEnv* env,
+ jobject obj);
+
+ // Gets the accept-languages preference string.
+ base::android::ScopedJavaLocalRef<jstring> GetAcceptLanguages(JNIEnv* env,
+ jobject obj);
+
private:
- // TODO(donnd): encapsulate these response parameters?
- void OnSearchTermResolutionResponse(bool is_invalid,
- int response_code,
- const std::string& search_term,
- const std::string& display_text,
- const std::string& alternate_term,
- bool prevent_preload,
- int selection_start_adjust,
- int selection_end_adjust);
+ void OnSearchTermResolutionResponse(
+ const ResolvedSearchTerm& resolved_search_term);
// Calls back to Java with the surrounding text to be displayed.
void OnSurroundingTextAvailable(const std::string& after_text);

Powered by Google App Engine
This is Rietveld 408576698