Index: content/common/mojo/service_registry_impl.cc |
diff --git a/content/common/mojo/service_registry_impl.cc b/content/common/mojo/service_registry_impl.cc |
index b26c60990bed5340a32939e2b7aca464966ff46e..46e9e64ab6fd1977ed3d1a1b585a6488720ba1bc 100644 |
--- a/content/common/mojo/service_registry_impl.cc |
+++ b/content/common/mojo/service_registry_impl.cc |
@@ -8,10 +8,19 @@ |
#include "mojo/common/common_type_converters.h" |
+#if defined(OS_ANDROID) |
+#include "content/common/mojo/service_registry_android.h" |
+#endif |
+ |
namespace content { |
ServiceRegistryImpl::ServiceRegistryImpl() |
- : binding_(this), weak_factory_(this) {} |
+ : binding_(this), |
+#if defined(OS_ANDROID) |
+ android_impl_(new ServiceRegistryAndroid(this)), |
Sam McNally
2016/03/31 23:40:26
Can you delay creating this until the first call t
please use gerrit instead
2016/04/01 01:23:27
Done.
|
+#endif |
+ weak_factory_(this) { |
+} |
ServiceRegistryImpl::~ServiceRegistryImpl() { |
while (!pending_connects_.empty()) { |
@@ -76,6 +85,13 @@ void ServiceRegistryImpl::ClearServiceOverridesForTesting() { |
service_overrides_.clear(); |
} |
+#if defined(OS_ANDROID) |
+const base::android::ScopedJavaGlobalRef<jobject>& |
+ServiceRegistryImpl::GetJavaObj() { |
+ return android_impl_->GetObj(); |
+} |
+#endif |
+ |
bool ServiceRegistryImpl::IsBound() const { |
return binding_.is_bound(); |
} |