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

Side by Side Diff: third_party/WebKit/Source/core/mojo/MojoHandle.h

Issue 2400563002: Adds Mojo IDL. (Closed)
Patch Set: addressed comments Created 3 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MojoHandle_h
6 #define MojoHandle_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "mojo/public/cpp/system/core.h"
10
11 namespace blink {
12
13 class MojoReadMessageOptions;
14 class MojoReadMessageResult;
15 class MojoWatchCallback;
16 class MojoWatcher;
17 class MojoWriteMessageOptions;
18 class ScriptState;
19
20 class MojoHandle final : public GarbageCollectedFinalized<MojoHandle>,
21 public ScriptWrappable {
22 DEFINE_WRAPPERTYPEINFO();
23
24 public:
25 CORE_EXPORT static MojoHandle* create(mojo::ScopedHandle);
26
27 static const MojoHandleSignals kHandleSignalNone = MOJO_HANDLE_SIGNAL_NONE;
28 static const MojoHandleSignals kHandleSignalReadable =
29 MOJO_HANDLE_SIGNAL_READABLE;
30 static const MojoHandleSignals kHandleSignalWritable =
31 MOJO_HANDLE_SIGNAL_WRITABLE;
32 static const MojoHandleSignals kHandleSignalPeerClosed =
33 MOJO_HANDLE_SIGNAL_PEER_CLOSED;
34
35 static const MojoWriteMessageFlags kWriteMessageFlagNone =
36 MOJO_WRITE_MESSAGE_FLAG_NONE;
37
38 static const MojoReadMessageFlags kReadMessageFlagNone =
39 MOJO_READ_MESSAGE_FLAG_NONE;
40 static const MojoReadMessageFlags kReadMessageFlagMayDiscard =
41 MOJO_READ_MESSAGE_FLAG_MAY_DISCARD;
42
43 MojoResult close();
44 MojoWatcher* watch(ScriptState*, MojoHandleSignals, MojoWatchCallback*);
45 MojoResult writeMessage(const MojoWriteMessageOptions&);
46 void readMessage(const MojoReadMessageOptions&, MojoReadMessageResult&);
47
48 DEFINE_INLINE_TRACE() {}
49
50 private:
51 explicit MojoHandle(mojo::ScopedHandle);
52
53 mojo::ScopedHandle m_handle;
54 };
55
56 } // namespace blink
57
58 #endif // MojoHandle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698