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

Unified Diff: content/renderer/mojo/blink_service_registry_wrapper.h

Issue 1830883002: Add blink::ServiceRegistry and expose it from LocalFrame and Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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_

Powered by Google App Engine
This is Rietveld 408576698