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

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

Issue 2400563002: Adds Mojo IDL. (Closed)
Patch Set: uses WebTaskRunner Created 3 years, 10 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/MojoHandle.h
diff --git a/third_party/WebKit/Source/core/mojo/MojoHandle.h b/third_party/WebKit/Source/core/mojo/MojoHandle.h
new file mode 100644
index 0000000000000000000000000000000000000000..78fa9138b91b48b5c6a4a888a89e79b86c7a4235
--- /dev/null
+++ b/third_party/WebKit/Source/core/mojo/MojoHandle.h
@@ -0,0 +1,46 @@
+// Copyright 2017 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 MojoHandle_h
+#define MojoHandle_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "mojo/public/cpp/system/core.h"
+
+namespace blink {
+
+class ArrayBufferOrArrayBufferView;
+class MojoHandleSignals;
+class MojoReadMessageFlags;
+class MojoReadMessageResult;
+class MojoWatchCallback;
+class MojoWatcher;
+class ScriptState;
+
+class MojoHandle final : public GarbageCollectedFinalized<MojoHandle>,
+ public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+
+ public:
+ CORE_EXPORT static MojoHandle* create(mojo::ScopedHandle);
+
+ void close();
+ MojoWatcher* watch(ScriptState*,
+ const MojoHandleSignals&,
+ MojoWatchCallback*);
+ MojoResult writeMessage(ArrayBufferOrArrayBufferView&,
+ const HeapVector<Member<MojoHandle>>&);
+ void readMessage(const MojoReadMessageFlags&, MojoReadMessageResult&);
+
+ DEFINE_INLINE_TRACE() {}
+
+ private:
+ explicit MojoHandle(mojo::ScopedHandle);
+
+ mojo::ScopedHandle m_handle;
+};
+
+} // namespace blink
+
+#endif // MojoHandle_h

Powered by Google App Engine
This is Rietveld 408576698