Index: third_party/WebKit/Source/core/mojo/MojoInterfaceProvider.h |
diff --git a/third_party/WebKit/Source/core/mojo/MojoInterfaceProvider.h b/third_party/WebKit/Source/core/mojo/MojoInterfaceProvider.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7ac4412da62b0cd6ba1b6422be9307409527a432 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/mojo/MojoInterfaceProvider.h |
@@ -0,0 +1,35 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
Ken Rockot(use gerrit already)
2016/10/07 23:22:27
There can be many InterfaceProviders in the system
alokp
2016/10/10 16:41:21
Good idea. In fact it might be more flexible have
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef MojoInterfaceProvider_h |
+#define MojoInterfaceProvider_h |
+ |
+#include "bindings/core/v8/ScriptWrappable.h" |
+#include "core/CoreExport.h" |
+#include "core/mojo/MojoHandle.h" |
+#include "public/platform/InterfaceProvider.h" |
+#include "wtf/text/WTFString.h" |
+ |
+namespace blink { |
+ |
+class CORE_EXPORT MojoInterfaceProvider |
+ : public GarbageCollectedFinalized<MojoInterfaceProvider>, |
+ public ScriptWrappable { |
+ DEFINE_WRAPPERTYPEINFO(); |
+ |
+ public: |
+ MojoInterfaceProvider(std::unique_ptr<InterfaceProvider>); |
+ virtual ~MojoInterfaceProvider(); |
+ |
+ MojoHandle* getInterface(String name); |
+ |
+ DEFINE_INLINE_TRACE() {} |
+ |
+ private: |
+ std::unique_ptr<InterfaceProvider> m_provider; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // MojoInterfaceProvider_h |