Index: content/renderer/mojo/blink_service_registry_wrapper.h |
diff --git a/content/renderer/mojo/blink_service_registry_wrapper.h b/content/renderer/mojo/blink_service_registry_wrapper.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..17092d3030f9c34c760313881d05487059257265 |
--- /dev/null |
+++ b/content/renderer/mojo/blink_service_registry_wrapper.h |
@@ -0,0 +1,36 @@ |
+// 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_RENDERER_MOJO_BLINK_SERVICE_REGISTRY_WRAPPER_H_ |
+#define CONTENT_RENDERER_MOJO_BLINK_SERVICE_REGISTRY_WRAPPER_H_ |
+ |
+#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
+#include "mojo/public/cpp/system/message_pipe.h" |
+#include "third_party/WebKit/public/platform/ServiceRegistry.h" |
+ |
+namespace content { |
+ |
+class ServiceRegistry; |
+ |
+// A wrapper around ServiceRegistry that implements blink::ServiceRegistry. |
+class BlinkServiceRegistryWrapper : public blink::ServiceRegistry { |
esprehn
2016/03/29 05:26:20
BlinkServiceRegistryImpl
that matches other platf
Sam McNally
2016/03/30 00:20:53
Done.
|
+ public: |
+ explicit BlinkServiceRegistryWrapper( |
+ content::ServiceRegistry* service_registry); |
+ ~BlinkServiceRegistryWrapper(); |
+ |
+ // blink::ServiceRegistry override. |
+ void connectToRemoteService(const char* name, |
+ mojo::ScopedMessagePipeHandle handle) override; |
+ |
+ private: |
+ const base::WeakPtr<content::ServiceRegistry> service_registry_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BlinkServiceRegistryWrapper); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_RENDERER_MOJO_BLINK_SERVICE_REGISTRY_WRAPPER_H_ |