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

Side by Side Diff: chrome/browser/android/contextualsearch/contextual_search_manager.cc

Issue 2844923002: Replace InterfaceRegistry on RenderFrameHostImpl with BinderRegistry (Closed)
Patch Set: . Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/contextualsearch/contextual_search_manager.h" 5 #include "chrome/browser/android/contextualsearch/contextual_search_manager.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "chrome/browser/android/contextualsearch/contextual_search_delegate.h" 13 #include "chrome/browser/android/contextualsearch/contextual_search_delegate.h"
14 #include "chrome/browser/android/contextualsearch/resolved_search_term.h" 14 #include "chrome/browser/android/contextualsearch/resolved_search_term.h"
15 #include "chrome/browser/android/tab_android.h" 15 #include "chrome/browser/android/tab_android.h"
16 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
17 #include "chrome/browser/search_engines/template_url_service_factory.h" 17 #include "chrome/browser/search_engines/template_url_service_factory.h"
18 #include "components/contextual_search/browser/contextual_search_js_api_service_ impl.h" 18 #include "components/contextual_search/browser/contextual_search_js_api_service_ impl.h"
19 #include "components/contextual_search/common/overlay_page_notifier_service.mojo m.h" 19 #include "components/contextual_search/common/overlay_page_notifier_service.mojo m.h"
20 #include "components/navigation_interception/intercept_navigation_delegate.h" 20 #include "components/navigation_interception/intercept_navigation_delegate.h"
21 #include "components/variations/variations_associated_data.h" 21 #include "components/variations/variations_associated_data.h"
22 #include "content/public/browser/render_frame_host.h" 22 #include "content/public/browser/render_frame_host.h"
23 #include "content/public/browser/render_view_host.h" 23 #include "content/public/browser/render_view_host.h"
24 #include "content/public/browser/web_contents.h" 24 #include "content/public/browser/web_contents.h"
25 #include "jni/ContextualSearchManager_jni.h" 25 #include "jni/ContextualSearchManager_jni.h"
26 #include "net/url_request/url_fetcher_impl.h" 26 #include "net/url_request/url_fetcher_impl.h"
27 #include "services/service_manager/public/cpp/binder_registry.h"
27 #include "services/service_manager/public/cpp/interface_provider.h" 28 #include "services/service_manager/public/cpp/interface_provider.h"
28 #include "services/service_manager/public/cpp/interface_registry.h"
29 29
30 using base::android::JavaParamRef; 30 using base::android::JavaParamRef;
31 using base::android::JavaRef; 31 using base::android::JavaRef;
32 using content::WebContents; 32 using content::WebContents;
33 33
34 // This class manages the native behavior of the Contextual Search feature. 34 // This class manages the native behavior of the Contextual Search feature.
35 // Instances of this class are owned by the Java ContextualSearchManager. 35 // Instances of this class are owned by the Java ContextualSearchManager.
36 // Most of the work is actually done in an associated delegate to this class: 36 // Most of the work is actually done in an associated delegate to this class:
37 // the ContextualSearchDelegate. 37 // the ContextualSearchDelegate.
38 ContextualSearchManager::ContextualSearchManager(JNIEnv* env, 38 ContextualSearchManager::ContextualSearchManager(JNIEnv* env,
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 194
195 void ContextualSearchManager::SetCaption(std::string caption, 195 void ContextualSearchManager::SetCaption(std::string caption,
196 bool does_answer) { 196 bool does_answer) {
197 JNIEnv* env = base::android::AttachCurrentThread(); 197 JNIEnv* env = base::android::AttachCurrentThread();
198 base::android::ScopedJavaLocalRef<jstring> j_caption = 198 base::android::ScopedJavaLocalRef<jstring> j_caption =
199 base::android::ConvertUTF8ToJavaString(env, caption.c_str()); 199 base::android::ConvertUTF8ToJavaString(env, caption.c_str());
200 Java_ContextualSearchManager_onSetCaption(env, java_manager_, j_caption, 200 Java_ContextualSearchManager_onSetCaption(env, java_manager_, j_caption,
201 does_answer); 201 does_answer);
202 } 202 }
OLDNEW
« no previous file with comments | « android_webview/browser/renderer_host/aw_render_view_host_ext.cc ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698