Index: chrome/browser/android/mojo/chrome_service_registrar_android.cc |
diff --git a/chrome/browser/android/mojo/chrome_service_registrar_android.cc b/chrome/browser/android/mojo/chrome_service_registrar_android.cc |
index c7749ada85ae04f7d19494f5d49ba627ff896300..80b48f45070acb3de68290c431187c809c1f7a95 100644 |
--- a/chrome/browser/android/mojo/chrome_service_registrar_android.cc |
+++ b/chrome/browser/android/mojo/chrome_service_registrar_android.cc |
@@ -7,6 +7,7 @@ |
#include "base/android/context_utils.h" |
#include "base/android/jni_android.h" |
#include "content/public/browser/android/service_registry_android.h" |
+#include "content/public/browser/web_contents.h" |
#include "jni/ChromeServiceRegistrar_jni.h" |
// static |
@@ -16,9 +17,12 @@ bool ChromeServiceRegistrarAndroid::Register(JNIEnv* env) { |
// static |
void ChromeServiceRegistrarAndroid::RegisterRenderFrameMojoServices( |
- content::ServiceRegistry* registry) { |
+ content::ServiceRegistry* registry, |
+ content::RenderFrameHost* render_frame_host) { |
Java_ChromeServiceRegistrar_registerRenderFrameMojoServices( |
base::android::AttachCurrentThread(), |
content::ServiceRegistryAndroid::Create(registry)->GetObj().obj(), |
- base::android::GetApplicationContext()); |
+ content::WebContents::FromRenderFrameHost(render_frame_host) |
+ ->GetJavaWebContents() |
+ .obj()); |
} |