OLD | NEW |
(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 Mojo_h |
| 6 #define Mojo_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "mojo/public/cpp/system/core.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class MojoCreateMessagePipeOptions; |
| 14 class MojoCreateMessagePipeResult; |
| 15 |
| 16 class Mojo final : public GarbageCollected<Mojo>, public ScriptWrappable { |
| 17 DEFINE_WRAPPERTYPEINFO(); |
| 18 |
| 19 public: |
| 20 CORE_EXPORT static Mojo* create(); |
| 21 |
| 22 // MojoResult |
| 23 static const MojoResult kResultOk = MOJO_HANDLE_SIGNAL_NONE; |
| 24 static const MojoResult kResultCancelled = MOJO_RESULT_CANCELLED; |
| 25 static const MojoResult kResultUnknown = MOJO_RESULT_UNKNOWN; |
| 26 static const MojoResult kResultInvalidArgument = MOJO_RESULT_INVALID_ARGUMENT; |
| 27 static const MojoResult kResultDeadlineExceeded = |
| 28 MOJO_RESULT_DEADLINE_EXCEEDED; |
| 29 static const MojoResult kResultNotFound = MOJO_RESULT_NOT_FOUND; |
| 30 static const MojoResult kResultAlreadyExists = MOJO_RESULT_ALREADY_EXISTS; |
| 31 static const MojoResult kResultPermissionDenied = |
| 32 MOJO_RESULT_PERMISSION_DENIED; |
| 33 static const MojoResult kResultResourceExhausted = |
| 34 MOJO_RESULT_RESOURCE_EXHAUSTED; |
| 35 static const MojoResult kResultFailedPrecondition = |
| 36 MOJO_RESULT_FAILED_PRECONDITION; |
| 37 static const MojoResult kResultAborted = MOJO_RESULT_ABORTED; |
| 38 static const MojoResult kResultOutOfRange = MOJO_RESULT_OUT_OF_RANGE; |
| 39 static const MojoResult kResultUnimplemented = MOJO_RESULT_UNIMPLEMENTED; |
| 40 static const MojoResult kResultInternal = MOJO_RESULT_INTERNAL; |
| 41 static const MojoResult kResultUnavailable = MOJO_RESULT_UNAVAILABLE; |
| 42 static const MojoResult kResultDataLoss = MOJO_RESULT_DATA_LOSS; |
| 43 static const MojoResult kResultBusy = MOJO_RESULT_BUSY; |
| 44 static const MojoResult kResultShouldWait = MOJO_RESULT_SHOULD_WAIT; |
| 45 |
| 46 // MessagePipe flags. |
| 47 static const MojoCreateMessagePipeOptionsFlags |
| 48 kCreateMessagePipeOptionsFlagNone = |
| 49 MOJO_CREATE_MESSAGE_PIPE_OPTIONS_FLAG_NONE; |
| 50 |
| 51 void createMessagePipe(const MojoCreateMessagePipeOptions&, |
| 52 MojoCreateMessagePipeResult&); |
| 53 |
| 54 DEFINE_INLINE_TRACE() {} |
| 55 }; |
| 56 |
| 57 } // namespace blink |
| 58 |
| 59 #endif // Mojo_h |
OLD | NEW |