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

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

Issue 2401333002: Add a blink InterfaceRegistry. (Closed)
Patch Set: Created 4 years, 2 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_interface_registry_impl.h
diff --git a/content/renderer/mojo/blink_interface_registry_impl.h b/content/renderer/mojo/blink_interface_registry_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..4365639b316d4388a8d24c6074959b770ce2fc13
--- /dev/null
+++ b/content/renderer/mojo/blink_interface_registry_impl.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_INTERFACE_REGISTRY_IMPL_H_
+#define CONTENT_RENDERER_MOJO_BLINK_INTERFACE_REGISTRY_IMPL_H_
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "third_party/WebKit/public/platform/InterfaceRegistry.h"
+
+namespace shell {
+class InterfaceRegistry;
+}
+
+namespace content {
+
+class BlinkInterfaceRegistryImpl : public blink::InterfaceRegistry {
+ public:
+ explicit BlinkInterfaceRegistryImpl(
+ base::WeakPtr<shell::InterfaceRegistry> interface_registry);
+ ~BlinkInterfaceRegistryImpl();
+
+ // blink::InterfaceRegistry override.
+ void addInterface(const char* name,
+ std::unique_ptr<blink::InterfaceFactory> factory) override;
+
+ private:
+ const base::WeakPtr<shell::InterfaceRegistry> interface_registry_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlinkInterfaceRegistryImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MOJO_BLINK_INTERFACE_REGISTRY_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698