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

Unified Diff: third_party/WebKit/Source/core/mojo/MojoInterfaceProvider.h

Issue 2400563002: Adds Mojo IDL. (Closed)
Patch Set: fixes modulename typo 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: 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

Powered by Google App Engine
This is Rietveld 408576698