diff options
author | jam <jam@chromium.org> | 2015-12-15 20:47:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-16 04:48:32 +0000 |
commit | 8540da176778c9959baa8dc51e477a46c7e5f8cc (patch) | |
tree | 672fd874aa06f73886bc828ee43ca6e1255877b6 /mojo | |
parent | 5a871cf36146874aadf22c4bcaa2cc1b635c2c03 (diff) | |
download | chromium_src-8540da176778c9959baa8dc51e477a46c7e5f8cc.zip chromium_src-8540da176778c9959baa8dc51e477a46c7e5f8cc.tar.gz chromium_src-8540da176778c9959baa8dc51e477a46c7e5f8cc.tar.bz2 |
Remove unused nacl related files in mojo/public.
Review URL: https://codereview.chromium.org/1523833002
Cr-Commit-Position: refs/heads/master@{#365446}
Diffstat (limited to 'mojo')
-rw-r--r-- | mojo/mojo_nacl.gypi | 9 | ||||
-rw-r--r-- | mojo/public/c/system/tests/core_unittest.cc | 13 | ||||
-rw-r--r-- | mojo/public/mojo_application.gni | 333 | ||||
-rw-r--r-- | mojo/public/platform/nacl/BUILD.gn | 31 | ||||
-rw-r--r-- | mojo/public/platform/nacl/DEPS | 4 | ||||
-rw-r--r-- | mojo/public/platform/nacl/libmojo.cc | 227 | ||||
-rw-r--r-- | mojo/public/platform/nacl/mojo_initial_handle.h | 14 | ||||
-rw-r--r-- | mojo/public/platform/nacl/mojo_irt.h | 100 | ||||
-rw-r--r-- | mojo/public/platform/nacl/mojo_main_thunk.cc | 12 |
9 files changed, 109 insertions, 634 deletions
diff --git a/mojo/mojo_nacl.gypi b/mojo/mojo_nacl.gypi deleted file mode 100644 index 01cfc21..0000000 --- a/mojo/mojo_nacl.gypi +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2014 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. - -{ - 'variables': { - 'monacl_codegen_dir': '<(SHARED_INTERMEDIATE_DIR)/<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))/nacl', - }, -} diff --git a/mojo/public/c/system/tests/core_unittest.cc b/mojo/public/c/system/tests/core_unittest.cc index de59a70..0a878b2 100644 --- a/mojo/public/c/system/tests/core_unittest.cc +++ b/mojo/public/c/system/tests/core_unittest.cc @@ -167,16 +167,7 @@ TEST(CoreTest, BasicMessagePipe) { EXPECT_EQ(MOJO_RESULT_OK, MojoClose(h1)); } -// TODO(ncbray): enable these tests once NaCl supports the corresponding APIs. -#ifdef __native_client__ -#define MAYBE_BasicDataPipe DISABLED_BasicDataPipe -#define MAYBE_BasicSharedBuffer DISABLED_BasicSharedBuffer -#else -#define MAYBE_BasicDataPipe BasicDataPipe -#define MAYBE_BasicSharedBuffer BasicSharedBuffer -#endif - -TEST(CoreTest, MAYBE_BasicDataPipe) { +TEST(CoreTest, BasicDataPipe) { MojoHandle hp, hc; MojoHandleSignals sig; char buffer[20] = {0}; @@ -287,7 +278,7 @@ TEST(CoreTest, MAYBE_BasicDataPipe) { // the producer never-writable? } -TEST(CoreTest, MAYBE_BasicSharedBuffer) { +TEST(CoreTest, BasicSharedBuffer) { MojoHandle h0, h1; void* pointer; diff --git a/mojo/public/mojo_application.gni b/mojo/public/mojo_application.gni index 3f068a3..c310eb6 100644 --- a/mojo/public/mojo_application.gni +++ b/mojo/public/mojo_application.gni @@ -39,245 +39,126 @@ template("mojo_native_application") { mojo_deps += [ ":$copy_step_name" ] } - if (!is_nacl) { - output = base_target_name + ".mojo" - library_target_name = base_target_name + "_library" - library_name = "${shlib_prefix}${library_target_name}${shlib_extension}" + output = base_target_name + ".mojo" + library_target_name = base_target_name + "_library" + library_name = "${shlib_prefix}${library_target_name}${shlib_extension}" - shared_library(library_target_name) { - if (defined(invoker.cflags)) { - cflags = invoker.cflags - } - if (defined(invoker.cflags_c)) { - cflags_c = invoker.cflags_c - } - if (defined(invoker.cflags_cc)) { - cflags_cc = invoker.cflags_cc - } - if (defined(invoker.cflags_objc)) { - cflags_objc = invoker.cflags_objc - } - if (defined(invoker.cflags_objcc)) { - cflags_objcc = invoker.cflags_objcc - } - if (defined(invoker.defines)) { - defines = invoker.defines - } - if (defined(invoker.include_dirs)) { - include_dirs = invoker.include_dirs - } - if (defined(invoker.ldflags)) { - ldflags = invoker.ldflags - } - if (defined(invoker.lib_dirs)) { - lib_dirs = invoker.lib_dirs - } - if (defined(invoker.libs)) { - libs = invoker.libs - } - - data_deps = [] - if (!defined(invoker.avoid_runner_cycle) || !invoker.avoid_runner_cycle) { - # Give the user an out; as some mojo services are depended on by the - # runner. - data_deps += [ "//mojo/runner:mojo_runner" ] - } - if (defined(invoker.data_deps)) { - data_deps += invoker.data_deps - } - - deps = [ - "//mojo/platform_handle:for_shared_library", - "//mojo/public/c/system:for_shared_library", - "//mojo/public/gles2:for_shared_library", - ] - - deps += mojo_deps - if (defined(invoker.public_deps)) { - public_deps = invoker.public_deps - } - if (defined(invoker.all_dependent_configs)) { - all_dependent_configs = invoker.all_dependent_configs - } - if (defined(invoker.public_configs)) { - public_configs = invoker.public_configs - } - if (defined(invoker.check_includes)) { - check_includes = invoker.check_includes - } - if (defined(invoker.configs)) { - configs += invoker.configs - } - if (defined(invoker.data)) { - data = invoker.data - } - if (defined(invoker.inputs)) { - inputs = invoker.inputs - } - if (defined(invoker.public)) { - public = invoker.public - } - if (defined(invoker.sources)) { - sources = invoker.sources - } - if (defined(invoker.testonly)) { - testonly = invoker.testonly - } + shared_library(library_target_name) { + if (defined(invoker.cflags)) { + cflags = invoker.cflags } - - copy(final_target_name) { - forward_variables_from(invoker, - [ - "testonly", - "visibility", - ]) - deps = [ - ":${library_target_name}", - ] - - sources = [ - "${root_shlib_dir}/${library_name}", - ] - outputs = [ - "${root_out_dir}/${base_target_name}/${output}", - ] + if (defined(invoker.cflags_c)) { + cflags_c = invoker.cflags_c } - - if (is_android) { - android_assets("${final_target_name}_assets") { - forward_variables_from(invoker, [ "testonly" ]) - deps = [ - ":${library_target_name}", - ] - if (defined(invoker.deps)) { - deps += invoker.deps - } - renaming_sources = [ "${root_shlib_dir}/${library_name}" ] - renaming_destinations = [ "${base_target_name}/${output}" ] - if (defined(invoker.resources)) { - renaming_sources += invoker.resources - renaming_destinations += process_file_template( - invoker.resources, - [ "$base_target_name/resources/{{source_file_part}}" ]) - } - } + if (defined(invoker.cflags_cc)) { + cflags_cc = invoker.cflags_cc + } + if (defined(invoker.cflags_objc)) { + cflags_objc = invoker.cflags_objc + } + if (defined(invoker.cflags_objcc)) { + cflags_objcc = invoker.cflags_objcc + } + if (defined(invoker.defines)) { + defines = invoker.defines + } + if (defined(invoker.include_dirs)) { + include_dirs = invoker.include_dirs + } + if (defined(invoker.ldflags)) { + ldflags = invoker.ldflags + } + if (defined(invoker.lib_dirs)) { + lib_dirs = invoker.lib_dirs + } + if (defined(invoker.libs)) { + libs = invoker.libs } - } else { - nexe_target_name = base_target_name + "_nexe" - nexe_name = base_target_name + ".nexe" - output = "${base_target_name}_${target_cpu}.nexe.mojo" + data_deps = [] + if (!defined(invoker.avoid_runner_cycle) || !invoker.avoid_runner_cycle) { + # Give the user an out; as some mojo services are depended on by the + # runner. + data_deps += [ "//mojo/runner:mojo_runner" ] + } + if (defined(invoker.data_deps)) { + data_deps += invoker.data_deps + } - executable(nexe_target_name) { - output_name = base_target_name + deps = [ + "//mojo/platform_handle:for_shared_library", + "//mojo/public/c/system:for_shared_library", + "//mojo/public/gles2:for_shared_library", + ] - if (defined(invoker.cflags)) { - cflags = invoker.cflags - } - if (defined(invoker.cflags_c)) { - cflags_c = invoker.cflags_c - } - if (defined(invoker.cflags_cc)) { - cflags_cc = invoker.cflags_cc - } - if (defined(invoker.cflags_objc)) { - cflags_objc = invoker.cflags_objc - } - if (defined(invoker.cflags_objcc)) { - cflags_objcc = invoker.cflags_objcc - } - if (defined(invoker.defines)) { - defines = invoker.defines - } - if (defined(invoker.include_dirs)) { - include_dirs = invoker.include_dirs - } - if (defined(invoker.ldflags)) { - ldflags = invoker.ldflags - } - if (defined(invoker.lib_dirs)) { - lib_dirs = invoker.lib_dirs - } - if (defined(invoker.libs)) { - libs = invoker.libs - } + deps += mojo_deps + if (defined(invoker.public_deps)) { + public_deps = invoker.public_deps + } + if (defined(invoker.all_dependent_configs)) { + all_dependent_configs = invoker.all_dependent_configs + } + if (defined(invoker.public_configs)) { + public_configs = invoker.public_configs + } + if (defined(invoker.check_includes)) { + check_includes = invoker.check_includes + } + if (defined(invoker.configs)) { + configs += invoker.configs + } + if (defined(invoker.data)) { + data = invoker.data + } + if (defined(invoker.inputs)) { + inputs = invoker.inputs + } + if (defined(invoker.public)) { + public = invoker.public + } + if (defined(invoker.sources)) { + sources = invoker.sources + } + if (defined(invoker.testonly)) { + testonly = invoker.testonly + } + } - data_deps = [] - if (defined(invoker.data_deps)) { - data_deps = invoker.data_deps - } + copy(final_target_name) { + forward_variables_from(invoker, + [ + "testonly", + "visibility", + ]) + deps = [ + ":${library_target_name}", + ] + + sources = [ + "${root_shlib_dir}/${library_name}", + ] + outputs = [ + "${root_out_dir}/${base_target_name}/${output}", + ] + } + if (is_android) { + android_assets("${final_target_name}_assets") { + forward_variables_from(invoker, [ "testonly" ]) deps = [ - "//mojo/public/c/system", - "//mojo/public/platform/nacl:system", + ":${library_target_name}", ] - - deps += mojo_deps - if (defined(invoker.public_deps)) { - public_deps = invoker.public_deps - } - if (defined(invoker.all_dependent_configs)) { - all_dependent_configs = invoker.all_dependent_configs - } - if (defined(invoker.public_configs)) { - public_configs = invoker.public_configs - } - if (defined(invoker.check_includes)) { - check_includes = invoker.check_includes - } - if (defined(invoker.configs)) { - configs += invoker.configs - } - if (defined(invoker.data)) { - data = invoker.data - } - if (defined(invoker.inputs)) { - inputs = invoker.inputs - } - if (defined(invoker.public)) { - public = invoker.public - } - if (defined(invoker.sources)) { - sources = invoker.sources - } - if (defined(invoker.testonly)) { - testonly = invoker.testonly - } - - visibility = [ ":${final_target_name}" ] - } - - action(target_name) { - if (defined(invoker.testonly)) { - testonly = invoker.testonly + if (defined(invoker.deps)) { + deps += invoker.deps } - if (defined(invoker.visibility)) { - visibility = invoker.visibility + renaming_sources = [ "${root_shlib_dir}/${library_name}" ] + renaming_destinations = [ "${base_target_name}/${output}" ] + if (defined(invoker.resources)) { + renaming_sources += invoker.resources + renaming_destinations += process_file_template( + invoker.resources, + [ "$base_target_name/resources/{{source_file_part}}" ]) } - - script = "//mojo/public/tools/prepend.py" - - input_path = "${root_out_dir}/${nexe_name}" - inputs = [ - input_path, - ] - - output_path = "${root_build_dir}/${base_target_name}/${output}" - outputs = [ - output_path, - ] - - deps = [ - ":${nexe_target_name}", - ] - - rebase_input = rebase_path(input_path, root_build_dir) - rebase_output = rebase_path(output_path, root_build_dir) - args = [ - "--input=$rebase_input", - "--output=$rebase_output", - "--line=#!mojo mojo:nacl_content_handler", - ] } } } diff --git a/mojo/public/platform/nacl/BUILD.gn b/mojo/public/platform/nacl/BUILD.gn deleted file mode 100644 index ba29a79..0000000 --- a/mojo/public/platform/nacl/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2014 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. - -assert(is_nacl) - -# Untrusted code -if (is_nacl) { - # Thunk mapping the Mojo public API onto NaCl syscalls. - source_set("mojo") { - sources = [ - "libmojo.cc", - "mojo_irt.h", - ] - deps = [ - "//mojo/public/c/system", - ] - } - - source_set("system") { - sources = [ - "mojo_initial_handle.h", - "mojo_main_thunk.cc", - ] - - deps = [ - "//mojo/public/c/system", - "//mojo/public/platform/nacl:mojo", - ] - } -} diff --git a/mojo/public/platform/nacl/DEPS b/mojo/public/platform/nacl/DEPS deleted file mode 100644 index ef97f1a..0000000 --- a/mojo/public/platform/nacl/DEPS +++ /dev/null @@ -1,4 +0,0 @@ -include_rules = [ - # This code is checked into the chromium repo so it's fine to depend on this. - "+native_client", -] diff --git a/mojo/public/platform/nacl/libmojo.cc b/mojo/public/platform/nacl/libmojo.cc deleted file mode 100644 index de0b495..0000000 --- a/mojo/public/platform/nacl/libmojo.cc +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2014 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. - -// WARNING this file was generated by generate_nacl_bindings.py -// Do not edit by hand. - -#include "mojo/public/c/system/core.h" -#include "mojo/public/platform/nacl/mojo_irt.h" -#include "native_client/src/public/chrome_main.h" -#include "native_client/src/public/imc_syscalls.h" -#include "native_client/src/public/imc_types.h" -#include "native_client/src/untrusted/irt/irt.h" - -// The value for this FD must not conflict with uses inside Chromium. However, -// mojo/nacl doesn't depend on any Chromium headers, so we can't use a #define -// from there. -#define NACL_MOJO_DESC (NACL_CHROME_DESC_BASE + 3) - -bool g_irt_mojo_valid = false; -struct nacl_irt_mojo g_irt_mojo; - -struct nacl_irt_mojo* get_irt_mojo() { - if (!g_irt_mojo_valid) { - size_t rc = nacl_interface_query(NACL_IRT_MOJO_v0_1, &g_irt_mojo, - sizeof(g_irt_mojo)); - if (rc != sizeof(g_irt_mojo)) - return NULL; - else - g_irt_mojo_valid = true; - } - return &g_irt_mojo; -} - -MojoResult MojoCreateSharedBuffer( - const struct MojoCreateSharedBufferOptions* options, - uint64_t num_bytes, - MojoHandle* shared_buffer_handle) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoCreateSharedBuffer(options, num_bytes, - shared_buffer_handle); -} - -MojoResult MojoDuplicateBufferHandle( - MojoHandle buffer_handle, - const struct MojoDuplicateBufferHandleOptions* options, - MojoHandle* new_buffer_handle) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoDuplicateBufferHandle(buffer_handle, options, - new_buffer_handle); -} - -MojoResult MojoMapBuffer(MojoHandle buffer_handle, - uint64_t offset, - uint64_t num_bytes, - void** buffer, - MojoMapBufferFlags flags) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoMapBuffer(buffer_handle, offset, num_bytes, buffer, - flags); -} - -MojoResult MojoUnmapBuffer(void* buffer) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoUnmapBuffer(buffer); -} - -MojoResult MojoCreateDataPipe(const struct MojoCreateDataPipeOptions* options, - MojoHandle* data_pipe_producer_handle, - MojoHandle* data_pipe_consumer_handle) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoCreateDataPipe(options, data_pipe_producer_handle, - data_pipe_consumer_handle); -} - -MojoResult MojoWriteData(MojoHandle data_pipe_producer_handle, - const void* elements, - uint32_t* num_bytes, - MojoWriteDataFlags flags) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoWriteData(data_pipe_producer_handle, elements, num_bytes, - flags); -} - -MojoResult MojoBeginWriteData(MojoHandle data_pipe_producer_handle, - void** buffer, - uint32_t* buffer_num_bytes, - MojoWriteDataFlags flags) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoBeginWriteData(data_pipe_producer_handle, buffer, - buffer_num_bytes, flags); -} - -MojoResult MojoEndWriteData(MojoHandle data_pipe_producer_handle, - uint32_t num_bytes_written) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoEndWriteData(data_pipe_producer_handle, - num_bytes_written); -} - -MojoResult MojoReadData(MojoHandle data_pipe_consumer_handle, - void* elements, - uint32_t* num_bytes, - MojoReadDataFlags flags) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoReadData(data_pipe_consumer_handle, elements, num_bytes, - flags); -} - -MojoResult MojoBeginReadData(MojoHandle data_pipe_consumer_handle, - const void** buffer, - uint32_t* buffer_num_bytes, - MojoReadDataFlags flags) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoBeginReadData(data_pipe_consumer_handle, buffer, - buffer_num_bytes, flags); -} - -MojoResult MojoEndReadData(MojoHandle data_pipe_consumer_handle, - uint32_t num_bytes_read) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoEndReadData(data_pipe_consumer_handle, num_bytes_read); -} - -MojoTimeTicks MojoGetTimeTicksNow() { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoGetTimeTicksNow(); -} - -MojoResult MojoClose(MojoHandle handle) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoClose(handle); -} - -MojoResult MojoWait(MojoHandle handle, - MojoHandleSignals signals, - MojoDeadline deadline, - struct MojoHandleSignalsState* signals_state) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoWait(handle, signals, deadline, signals_state); -} - -MojoResult MojoWaitMany(const MojoHandle* handles, - const MojoHandleSignals* signals, - uint32_t num_handles, - MojoDeadline deadline, - uint32_t* result_index, - struct MojoHandleSignalsState* signals_states) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoWaitMany(handles, signals, num_handles, deadline, - result_index, signals_states); -} - -MojoResult MojoCreateMessagePipe( - const struct MojoCreateMessagePipeOptions* options, - MojoHandle* message_pipe_handle0, - MojoHandle* message_pipe_handle1) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoCreateMessagePipe(options, message_pipe_handle0, - message_pipe_handle1); -} - -MojoResult MojoWriteMessage(MojoHandle message_pipe_handle, - const void* bytes, - uint32_t num_bytes, - const MojoHandle* handles, - uint32_t num_handles, - MojoWriteMessageFlags flags) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoWriteMessage(message_pipe_handle, bytes, num_bytes, - handles, num_handles, flags); -} - -MojoResult MojoReadMessage(MojoHandle message_pipe_handle, - void* bytes, - uint32_t* num_bytes, - MojoHandle* handles, - uint32_t* num_handles, - MojoReadMessageFlags flags) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->MojoReadMessage(message_pipe_handle, bytes, num_bytes, - handles, num_handles, flags); -} - -MojoResult _MojoGetInitialHandle(MojoHandle* handle) { - struct nacl_irt_mojo* irt_mojo = get_irt_mojo(); - if (irt_mojo == NULL) - return MOJO_RESULT_INTERNAL; - return irt_mojo->_MojoGetInitialHandle(handle); -} - diff --git a/mojo/public/platform/nacl/mojo_initial_handle.h b/mojo/public/platform/nacl/mojo_initial_handle.h deleted file mode 100644 index e02146c..0000000 --- a/mojo/public/platform/nacl/mojo_initial_handle.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2014 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 MOJO_PUBLIC_PLATFORM_NACL_MOJO_INITIAL_HANDLE_H_ -#define MOJO_PUBLIC_PLATFORM_NACL_MOJO_INITIAL_HANDLE_H_ - -#include "mojo/public/c/system/types.h" - -// Provides a MojoHandle that allows untrusted code to communicate with Mojo -// interfaces outside the sandbox or in other processes. -MojoResult _MojoGetInitialHandle(MojoHandle* out_handle); - -#endif // MOJO_PUBLIC_PLATFORM_NACL_MOJO_INITIAL_HANDLE_H_ diff --git a/mojo/public/platform/nacl/mojo_irt.h b/mojo/public/platform/nacl/mojo_irt.h deleted file mode 100644 index db3a180..0000000 --- a/mojo/public/platform/nacl/mojo_irt.h +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2015 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. - -// WARNING this file was generated by generate_nacl_bindings.py -// Do not edit by hand. - -#ifndef MOJO_PUBLIC_PLATFORM_NACL_MOJO_IRT_H_ -#define MOJO_PUBLIC_PLATFORM_NACL_MOJO_IRT_H_ - -#include "mojo/public/c/system/buffer.h" -#include "mojo/public/c/system/data_pipe.h" -#include "mojo/public/c/system/message_pipe.h" -#include "mojo/public/c/system/types.h" - -#define NACL_IRT_MOJO_v0_1 "nacl-irt-mojo-0.1" - -struct nacl_irt_mojo { - MojoResult (*MojoCreateSharedBuffer)( - const struct MojoCreateSharedBufferOptions* options, - uint64_t num_bytes, - MojoHandle* shared_buffer_handle); - MojoResult (*MojoDuplicateBufferHandle)( - MojoHandle buffer_handle, - const struct MojoDuplicateBufferHandleOptions* options, - MojoHandle* new_buffer_handle); - MojoResult (*MojoMapBuffer)(MojoHandle buffer_handle, - uint64_t offset, - uint64_t num_bytes, - void** buffer, - MojoMapBufferFlags flags); - MojoResult (*MojoUnmapBuffer)(void* buffer); - MojoResult (*MojoCreateDataPipe)( - const struct MojoCreateDataPipeOptions* options, - MojoHandle* data_pipe_producer_handle, - MojoHandle* data_pipe_consumer_handle); - MojoResult (*MojoWriteData)(MojoHandle data_pipe_producer_handle, - const void* elements, - uint32_t* num_bytes, - MojoWriteDataFlags flags); - MojoResult (*MojoBeginWriteData)(MojoHandle data_pipe_producer_handle, - void** buffer, - uint32_t* buffer_num_bytes, - MojoWriteDataFlags flags); - MojoResult (*MojoEndWriteData)(MojoHandle data_pipe_producer_handle, - uint32_t num_bytes_written); - MojoResult (*MojoReadData)(MojoHandle data_pipe_consumer_handle, - void* elements, - uint32_t* num_bytes, - MojoReadDataFlags flags); - MojoResult (*MojoBeginReadData)(MojoHandle data_pipe_consumer_handle, - const void** buffer, - uint32_t* buffer_num_bytes, - MojoReadDataFlags flags); - MojoResult (*MojoEndReadData)(MojoHandle data_pipe_consumer_handle, - uint32_t num_bytes_read); - MojoTimeTicks (*MojoGetTimeTicksNow)(); - MojoResult (*MojoClose)(MojoHandle handle); - MojoResult (*MojoWait)(MojoHandle handle, - MojoHandleSignals signals, - MojoDeadline deadline, - struct MojoHandleSignalsState* signals_state); - MojoResult (*MojoWaitMany)(const MojoHandle* handles, - const MojoHandleSignals* signals, - uint32_t num_handles, - MojoDeadline deadline, - uint32_t* result_index, - struct MojoHandleSignalsState* signals_states); - MojoResult (*MojoCreateMessagePipe)( - const struct MojoCreateMessagePipeOptions* options, - MojoHandle* message_pipe_handle0, - MojoHandle* message_pipe_handle1); - MojoResult (*MojoWriteMessage)(MojoHandle message_pipe_handle, - const void* bytes, - uint32_t num_bytes, - const MojoHandle* handles, - uint32_t num_handles, - MojoWriteMessageFlags flags); - MojoResult (*MojoReadMessage)(MojoHandle message_pipe_handle, - void* bytes, - uint32_t* num_bytes, - MojoHandle* handles, - uint32_t* num_handles, - MojoReadMessageFlags flags); - MojoResult (*_MojoGetInitialHandle)(MojoHandle* handle); -}; - -#ifdef __cplusplus -extern "C" { -#endif - -size_t mojo_irt_query(const char* interface_ident, - void* table, - size_t tablesize); - -#ifdef __cplusplus -} -#endif - -#endif // MOJO_PUBLIC_PLATFORM_NACL_MOJO_IRT_H_ diff --git a/mojo/public/platform/nacl/mojo_main_thunk.cc b/mojo/public/platform/nacl/mojo_main_thunk.cc deleted file mode 100644 index 7cb5b52..0000000 --- a/mojo/public/platform/nacl/mojo_main_thunk.cc +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2015 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. - -#include "mojo/public/c/system/main.h" -#include "mojo/public/platform/nacl/mojo_initial_handle.h" - -int main() { - MojoHandle handle; - _MojoGetInitialHandle(&handle); - return MojoMain(handle); -} |