Index: third_party/WebKit/public/platform/Connector.h |
diff --git a/third_party/WebKit/public/platform/Connector.h b/third_party/WebKit/public/platform/Connector.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..666eea59020ff8775b470feb95d7dd1c8642ef1e |
--- /dev/null |
+++ b/third_party/WebKit/public/platform/Connector.h |
@@ -0,0 +1,32 @@ |
+// 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 Connector_h |
+#define Connector_h |
+ |
+#include "mojo/public/cpp/bindings/interface_request.h" |
+#include "mojo/public/cpp/system/message_pipe.h" |
+#include "public/platform/WebCommon.h" |
+ |
+namespace blink { |
+ |
+// Supports obtaining interfaces from services specified by name. |
+class BLINK_PLATFORM_EXPORT Connector { |
+ public: |
+ virtual void bindInterface(const char* serviceName, |
+ const char* interfaceName, |
+ mojo::ScopedMessagePipeHandle) = 0; |
+ |
+ template <typename Interface> |
+ void bindInterface(const char* serviceName, |
+ mojo::InterfaceRequest<Interface> ptr) { |
+ bindInterface(serviceName, Interface::Name_, ptr.PassMessagePipe()); |
+ } |
+ |
+ static Connector* getEmptyConnector(); |
+}; |
+ |
+} // namespace blink |
+ |
+#endif |