| Index: third_party/mojo/src/mojo/edk/system/core.h
|
| diff --git a/third_party/mojo/src/mojo/edk/system/core.h b/third_party/mojo/src/mojo/edk/system/core.h
|
| index 0ff9c01894d7894232e45a29cb5d4018143be376..7833193c44f86c036359b7596ef68bd5a9ac7dc6 100644
|
| --- a/third_party/mojo/src/mojo/edk/system/core.h
|
| +++ b/third_party/mojo/src/mojo/edk/system/core.h
|
| @@ -39,7 +39,9 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
|
| // ---------------------------------------------------------------------------
|
|
|
| // These methods are only to be used by via the embedder API (and internally):
|
| - explicit Core(scoped_ptr<embedder::PlatformSupport> platform_support);
|
| +
|
| + // |*platform_support| must outlive this object.
|
| + explicit Core(embedder::PlatformSupport* platform_support);
|
| virtual ~Core();
|
|
|
| // Adds |dispatcher| to the handle table, returning the handle for it. Returns
|
| @@ -59,12 +61,19 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
|
| base::Callback<void(MojoResult)> callback);
|
|
|
| embedder::PlatformSupport* platform_support() const {
|
| - return platform_support_.get();
|
| + return platform_support_;
|
| }
|
|
|
| // ---------------------------------------------------------------------------
|
|
|
| - // System calls implementation:
|
| + // The following methods are essentially implementations of the Mojo Core
|
| + // functions of the Mojo API, with the C interface translated to C++ by
|
| + // "mojo/edk/embedder/entrypoints.cc". The best way to understand the contract
|
| + // of these methods is to look at the header files defining the corresponding
|
| + // API functions, referenced below.
|
| +
|
| + // These methods correspond to the API functions defined in
|
| + // "mojo/public/c/system/functions.h":
|
| MojoTimeTicks GetTimeTicksNow();
|
| MojoResult Close(MojoHandle handle);
|
| MojoResult Wait(MojoHandle handle,
|
| @@ -77,6 +86,9 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
|
| MojoDeadline deadline,
|
| UserPointer<uint32_t> result_index,
|
| UserPointer<MojoHandleSignalsState> signals_states);
|
| +
|
| + // These methods correspond to the API functions defined in
|
| + // "mojo/public/c/system/message_pipe.h":
|
| MojoResult CreateMessagePipe(
|
| UserPointer<const MojoCreateMessagePipeOptions> options,
|
| UserPointer<MojoHandle> message_pipe_handle0,
|
| @@ -93,6 +105,9 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
|
| UserPointer<MojoHandle> handles,
|
| UserPointer<uint32_t> num_handles,
|
| MojoReadMessageFlags flags);
|
| +
|
| + // These methods correspond to the API functions defined in
|
| + // "mojo/public/c/system/data_pipe.h":
|
| MojoResult CreateDataPipe(
|
| UserPointer<const MojoCreateDataPipeOptions> options,
|
| UserPointer<MojoHandle> data_pipe_producer_handle,
|
| @@ -117,6 +132,9 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
|
| MojoReadDataFlags flags);
|
| MojoResult EndReadData(MojoHandle data_pipe_consumer_handle,
|
| uint32_t num_bytes_read);
|
| +
|
| + // These methods correspond to the API functions defined in
|
| + // "mojo/public/c/system/buffer.h":
|
| MojoResult CreateSharedBuffer(
|
| UserPointer<const MojoCreateSharedBufferOptions> options,
|
| uint64_t num_bytes,
|
| @@ -146,7 +164,7 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
|
| uint32_t* result_index,
|
| HandleSignalsState* signals_states);
|
|
|
| - const scoped_ptr<embedder::PlatformSupport> platform_support_;
|
| + embedder::PlatformSupport* const platform_support_;
|
|
|
| // TODO(vtl): |handle_table_lock_| should be a reader-writer lock (if only we
|
| // had them).
|
|
|