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

Unified Diff: content/common/mojo/service_registry_impl.cc

Issue 1831173002: Scaffolding for Android implementation of PaymentRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo
Patch Set: Register PaymentRequest with render process Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/mojo/service_registry_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « content/common/mojo/service_registry_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698