| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef Mojo_h | 5 #ifndef Mojo_h |
| 6 #define Mojo_h | 6 #define Mojo_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "mojo/public/cpp/system/core.h" | 9 #include "mojo/public/cpp/system/core.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class MojoCreateDataPipeOptions; |
| 14 class MojoCreateDataPipeResult; |
| 13 class MojoCreateMessagePipeResult; | 15 class MojoCreateMessagePipeResult; |
| 14 class MojoCreateSharedBufferResult; | 16 class MojoCreateSharedBufferResult; |
| 15 | 17 |
| 16 class Mojo final : public GarbageCollected<Mojo>, public ScriptWrappable { | 18 class Mojo final : public GarbageCollected<Mojo>, public ScriptWrappable { |
| 17 DEFINE_WRAPPERTYPEINFO(); | 19 DEFINE_WRAPPERTYPEINFO(); |
| 18 | 20 |
| 19 public: | 21 public: |
| 20 // MojoResult | 22 // MojoResult |
| 21 static const MojoResult kResultOk = MOJO_RESULT_OK; | 23 static const MojoResult kResultOk = MOJO_RESULT_OK; |
| 22 static const MojoResult kResultCancelled = MOJO_RESULT_CANCELLED; | 24 static const MojoResult kResultCancelled = MOJO_RESULT_CANCELLED; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 35 static const MojoResult kResultAborted = MOJO_RESULT_ABORTED; | 37 static const MojoResult kResultAborted = MOJO_RESULT_ABORTED; |
| 36 static const MojoResult kResultOutOfRange = MOJO_RESULT_OUT_OF_RANGE; | 38 static const MojoResult kResultOutOfRange = MOJO_RESULT_OUT_OF_RANGE; |
| 37 static const MojoResult kResultUnimplemented = MOJO_RESULT_UNIMPLEMENTED; | 39 static const MojoResult kResultUnimplemented = MOJO_RESULT_UNIMPLEMENTED; |
| 38 static const MojoResult kResultInternal = MOJO_RESULT_INTERNAL; | 40 static const MojoResult kResultInternal = MOJO_RESULT_INTERNAL; |
| 39 static const MojoResult kResultUnavailable = MOJO_RESULT_UNAVAILABLE; | 41 static const MojoResult kResultUnavailable = MOJO_RESULT_UNAVAILABLE; |
| 40 static const MojoResult kResultDataLoss = MOJO_RESULT_DATA_LOSS; | 42 static const MojoResult kResultDataLoss = MOJO_RESULT_DATA_LOSS; |
| 41 static const MojoResult kResultBusy = MOJO_RESULT_BUSY; | 43 static const MojoResult kResultBusy = MOJO_RESULT_BUSY; |
| 42 static const MojoResult kResultShouldWait = MOJO_RESULT_SHOULD_WAIT; | 44 static const MojoResult kResultShouldWait = MOJO_RESULT_SHOULD_WAIT; |
| 43 | 45 |
| 44 static void createMessagePipe(MojoCreateMessagePipeResult&); | 46 static void createMessagePipe(MojoCreateMessagePipeResult&); |
| 47 static void createDataPipe(const MojoCreateDataPipeOptions&, |
| 48 MojoCreateDataPipeResult&); |
| 45 static void createSharedBuffer(unsigned numBytes, | 49 static void createSharedBuffer(unsigned numBytes, |
| 46 MojoCreateSharedBufferResult&); | 50 MojoCreateSharedBufferResult&); |
| 47 | 51 |
| 48 DEFINE_INLINE_TRACE() {} | 52 DEFINE_INLINE_TRACE() {} |
| 49 }; | 53 }; |
| 50 | 54 |
| 51 } // namespace blink | 55 } // namespace blink |
| 52 | 56 |
| 53 #endif // Mojo_h | 57 #endif // Mojo_h |
| OLD | NEW |