Index: content/browser/mojo/browser_service_registry_impl.h |
diff --git a/content/browser/mojo/browser_service_registry_impl.h b/content/browser/mojo/browser_service_registry_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..88b9ebb42a3a18782aac3f6f224fef48190ad374 |
--- /dev/null |
+++ b/content/browser/mojo/browser_service_registry_impl.h |
@@ -0,0 +1,53 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_MOJO_BROWSER_SERVICE_REGISTRY_IMPL_ |
+#define CONTENT_BROWSER_MOJO_BROWSER_SERVICE_REGISTRY_IMPL_ |
+ |
+#include "content/common/mojo/service_registry_impl.h" |
+#include "content/public/browser/browser_service_registry.h" |
+ |
+namespace content { |
+ |
+// Implementation of BrowserServiceRegistry. |
+class CONTENT_EXPORT BrowserServiceRegistryImpl : public BrowserServiceRegistry { |
+ public: |
+ virtual ~BrowserServiceRegistryImpl() {} |
+ |
+ // Implement the ServiceRegistry part of BrowserServiceRegistry by means of |
+ // forwarding to our ServiceRegistryImpl member. |
+ void AddService( |
+ const std::string& service_name, |
+ const base::Callback<void(mojo::ScopedMessagePipeHandle)> |
+ service_factory) override { |
+ impl_.AddService(service_name, service_factory); |
+ } |
+ // And so forth. |
+ |
+#if defined(OS_ANDROID) |
+ // Implementation of android specific methods. This can probably just be |
+ // copied over from ServiceRegistryAndroid, or you could have a getter that |
+ // returns the ServiceRegistryAndroid. |
+ void AddService( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& j_service_registry, |
+ const base::android::JavaParamRef<jobject>& j_manager, |
+ const base::android::JavaParamRef<jobject>& j_factory, |
+ const base::android::JavaParamRef<jstring>& j_name) override; |
+#endif |
+ |
+ private: |
+ // Our ServiceRegistry methods are implemented in terms of the following |
+ // ServiceRegistryImpl member. |
+ ServiceRegistryImpl impl_; |
+ |
+#if defined(OS_ANDROID) |
+ // Android specific data members here. Probably just copied over from |
+ // existing ServiceRegistryAndroid. |
+#endif |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTEBROWSER_MOJO_BROWSER_SERVICE_REGISTRY_IMPL_ |