summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/base.gypi3
-rw-r--r--base/base_untrusted.gyp4
-rw-r--r--base/rand_util_nacl.cc53
-rw-r--r--build/all.gyp6
-rw-r--r--ipc/ipc_channel.cc9
-rw-r--r--ipc/ipc_untrusted.gyp4
-rw-r--r--ppapi/native_client/native_client.gyp163
-rw-r--r--ppapi/ppapi_internal.gyp63
-rw-r--r--ppapi/ppapi_proxy.gypi366
-rw-r--r--ppapi/ppapi_proxy_untrusted.gyp34
-rw-r--r--ppapi/ppapi_proxy_untrusted.gypi416
-rw-r--r--ppapi/ppapi_shared.gypi555
-rw-r--r--ppapi/ppapi_shared_untrusted.gyp35
-rw-r--r--ppapi/proxy/DEPS6
-rw-r--r--ppapi/proxy/plugin_main_nacl.cc140
-rw-r--r--ppapi/proxy/ppapi_messages.h2
16 files changed, 934 insertions, 925 deletions
diff --git a/base/base.gypi b/base/base.gypi
index 2f01f53..22aeda7 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -286,7 +286,6 @@
'property_bag.h',
'rand_util.cc',
'rand_util.h',
- 'rand_util_nacl.cc',
'rand_util_posix.cc',
'rand_util_win.cc',
'safe_strerror_posix.cc',
@@ -525,6 +524,8 @@
'process_posix.cc',
'process_util.cc',
'process_util_posix.cc',
+ 'rand_util.cc',
+ 'rand_util_posix.cc',
'scoped_native_library.cc',
'scoped_temp_dir.cc',
'shared_memory_posix.cc',
diff --git a/base/base_untrusted.gyp b/base/base_untrusted.gyp
index 16aef58..44baaa1 100644
--- a/base/base_untrusted.gyp
+++ b/base/base_untrusted.gyp
@@ -11,7 +11,7 @@
'base.gypi',
],
'conditions': [
- ['disable_nacl_untrusted==0', {
+ ['disable_nacl==0 and disable_nacl_untrusted==0', {
'targets': [
{
'target_name': 'base_untrusted',
@@ -32,8 +32,6 @@
},
'dependencies': [
'<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- '<(DEPTH)/native_client/src/untrusted/pthread/pthread.gyp:pthread_lib',
- '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib_newlib',
],
},
],
diff --git a/base/rand_util_nacl.cc b/base/rand_util_nacl.cc
deleted file mode 100644
index 718da05..0000000
--- a/base/rand_util_nacl.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2012 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 "base/rand_util.h"
-
-#include "base/lazy_instance.h"
-#include "base/logging.h"
-
-// TODO(bbudge) Replace this with a proper system header file when NaCl
-// provides one.
-#include "native_client/src/untrusted/irt/irt.h"
-
-namespace {
-
-// Create a wrapper class so we can cache the NaCl random number interface.
-class URandomInterface {
- public:
- URandomInterface() {
- size_t result = nacl_interface_query(NACL_IRT_RANDOM_v0_1,
- &interface_,
- sizeof(interface_));
- DCHECK_EQ(result, sizeof(interface_)) << "Can't get random interface.";
- }
-
- uint64 get_random_bytes() const {
- size_t nbytes;
- uint64 result;
- int error = interface_.get_random_bytes(&result,
- sizeof(result),
- &nbytes);
- DCHECK_EQ(error, 0);
- DCHECK_EQ(nbytes, sizeof(result));
- return result;
- }
-
- private:
- struct nacl_irt_random interface_;
-};
-
-base::LazyInstance<URandomInterface> g_urandom_interface =
- LAZY_INSTANCE_INITIALIZER;
-
-} // namespace
-
-namespace base {
-
-uint64 RandUint64() {
- return g_urandom_interface.Pointer()->get_random_bytes();
-}
-
-} // namespace base
-
diff --git a/build/all.gyp b/build/all.gyp
index 445287b..5eb6977 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -11,6 +11,7 @@
'dependencies': [
'some.gyp:*',
'../base/base.gyp:*',
+ '../base/base_untrusted.gyp:*',
'../chrome/chrome.gyp:*',
'../content/content.gyp:*',
'../crypto/crypto.gyp:*',
@@ -187,12 +188,11 @@
'../gpu/gpu.gyp:gpu_unittests',
'../gpu/gles2_conform_support/gles2_conform_support.gyp:gles2_conform_support',
'../ipc/ipc.gyp:ipc_tests',
- # TODO(bbudge): drop this when something meaningful depends on
- # ipc_untrusted.
- '../ipc/ipc_untrusted.gyp:ipc_untrusted',
'../jingle/jingle.gyp:jingle_unittests',
'../media/media.gyp:media_unittests',
'../net/net.gyp:net_unittests',
+ # TODO(bbudge): drop this when we have switched the NaCl proxy to IPC.
+ '../ppapi/ppapi_proxy_untrusted.gyp:ppapi_proxy_untrusted',
'../printing/printing.gyp:printing_unittests',
'../remoting/remoting.gyp:remoting_unittests',
'../sql/sql.gyp:sql_unittests',
diff --git a/ipc/ipc_channel.cc b/ipc/ipc_channel.cc
index d81d73b..94e1cc4 100644
--- a/ipc/ipc_channel.cc
+++ b/ipc/ipc_channel.cc
@@ -30,16 +30,15 @@ std::string Channel::GenerateUniqueRandomChannelID() {
// component. The strong random component prevents other processes from
// hijacking or squatting on predictable channel names.
- int process_id;
#if !defined(OS_NACL)
- process_id = base::GetCurrentProcId();
-#else
- process_id = 0;
-#endif
+ int process_id = base::GetCurrentProcId();
return base::StringPrintf("%d.%u.%d",
process_id,
g_last_id.GetNext(),
base::RandInt(0, std::numeric_limits<int32>::max()));
+#else
+ return std::string();
+#endif
}
} // namespace IPC
diff --git a/ipc/ipc_untrusted.gyp b/ipc/ipc_untrusted.gyp
index 5a6a6ff..dd389d4 100644
--- a/ipc/ipc_untrusted.gyp
+++ b/ipc/ipc_untrusted.gyp
@@ -11,7 +11,7 @@
'ipc.gypi',
],
'conditions': [
- ['disable_nacl_untrusted==0', {
+ ['disable_nacl==0 and disable_nacl_untrusted==0', {
'targets': [
{
'target_name': 'ipc_untrusted',
@@ -25,8 +25,6 @@
},
'dependencies': [
'<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- '<(DEPTH)/native_client/src/untrusted/pthread/pthread.gyp:pthread_lib',
- '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib_newlib',
'../base/base_untrusted.gyp:base_untrusted',
],
},
diff --git a/ppapi/native_client/native_client.gyp b/ppapi/native_client/native_client.gyp
index c34d6b5..c68bf0d 100644
--- a/ppapi/native_client/native_client.gyp
+++ b/ppapi/native_client/native_client.gyp
@@ -4,7 +4,7 @@
{
'includes': [
- '../../native_client/build/common.gypi',
+ '../../native_client/build/untrusted.gypi',
],
'conditions': [
['disable_nacl==0 and disable_nacl_untrusted==0', {
@@ -53,6 +53,12 @@
},
],
},
+ ],
+ }],
+ # TODO(bbudge) Remove the build_ppapi_ipc_proxy_untrusted flag, factor out common
+ # properties from both IRT flavors, and build them side by side.
+ ['disable_nacl==0 and disable_nacl_untrusted==0 and build_ppapi_ipc_proxy_untrusted==0', {
+ 'targets': [
{
'target_name': 'nacl_irt',
'type': 'none',
@@ -179,5 +185,160 @@
},
],
}],
+ ['disable_nacl==0 and disable_nacl_untrusted==0 and build_ppapi_ipc_proxy_untrusted==1', {
+ 'targets': [
+ {
+ 'target_name': 'nacl_irt',
+ 'type': 'none',
+ 'variables': {
+ 'nexe_target': 'nacl_irt',
+ # These out_* fields override the default filenames, which
+ # include a "_newlib" suffix.
+ 'out_newlib64': '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
+ 'out_newlib32': '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
+ 'out_newlib_arm': '<(PRODUCT_DIR)/nacl_irt_arm.nexe',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ 'include_dirs': [
+ 'lib/gl/include',
+ '..',
+ ],
+ 'link_flags': [
+ '-Wl,--start-group',
+ '-lirt_browser',
+ '-lppapi_proxy_untrusted',
+ '-lppapi_shared_untrusted',
+ '-lipc_untrusted',
+ '-lbase_untrusted',
+ '-lsrpc',
+ '-limc_syscalls',
+ '-lplatform',
+ '-lgio',
+ '-Wl,--end-group',
+ '-lm',
+ ],
+ # See http://code.google.com/p/nativeclient/issues/detail?id=2691.
+ # The PNaCl linker (gold) does not implement the "-Ttext-segment"
+ # option. However, with the linker for x86, the "-Ttext" option
+ # does not affect the executable's base address.
+ # TODO(olonho): simplify flags handling and avoid duplication
+ # with NaCl logic.
+ 'conditions': [
+ ['target_arch!="arm"',
+ {
+ 'link_flags': [
+ '-Wl,--section-start,.rodata=<(NACL_IRT_DATA_START)',
+ '-Wl,-Ttext-segment=<(NACL_IRT_TEXT_START)',
+ ]
+ }, { # target_arch == "arm"
+ 'link_flags': [
+ '-Wl,--section-start,.rodata=<(NACL_IRT_DATA_START)',
+ '-Wl,-Ttext=<(NACL_IRT_TEXT_START)',
+ '--pnacl-allow-native',
+ '-arch', 'arm',
+ '-Wt,-mtls-use-call',
+ ],
+ },
+ ],
+ ],
+ 'sources': [
+ ],
+ 'extra_args': [
+ '--strip-debug',
+ ],
+ # TODO(bradchen): get rid of extra_deps64 and extra_deps32
+ # once native_client/build/untrusted.gypi no longer needs them.
+ 'extra_deps64': [
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_proxy_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libbase_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libirt_browser.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libsrpc.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libplatform.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libimc_syscalls.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libgio.a',
+ ],
+ 'extra_deps32': [
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_proxy_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libbase_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libirt_browser.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libsrpc.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libplatform.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libimc_syscalls.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libgio.a',
+ ],
+ 'extra_deps_newlib64': [
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_proxy_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libbase_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libirt_browser.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libsrpc.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libplatform.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libimc_syscalls.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libgio.a',
+ ],
+ 'extra_deps_newlib32': [
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_proxy_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libbase_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libirt_browser.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libsrpc.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libplatform.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libimc_syscalls.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libgio.a',
+ ],
+ 'extra_deps_glibc64': [
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi_proxy_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libbase_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libirt_browser.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libsrpc.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libplatform.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libimc_syscalls.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libgio.a',
+ ],
+ 'extra_deps_glibc32': [
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi_proxy_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libbase_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libirt_browser.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libsrpc.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libplatform.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libimc_syscalls.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libgio.a',
+ ],
+ 'extra_deps_arm': [
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi_proxy_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libbase_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libirt_browser.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libsrpc.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libplatform.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libimc_syscalls.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libgio.a',
+ ],
+ },
+ 'dependencies': [
+ '../ppapi_proxy_untrusted.gyp:ppapi_proxy_untrusted',
+ '../ppapi_shared_untrusted.gyp:ppapi_shared_untrusted',
+ '../../ipc/ipc_untrusted.gyp:ipc_untrusted',
+ '../../base/base_untrusted.gyp:base_untrusted',
+ '../../native_client/src/untrusted/irt/irt.gyp:irt_browser_lib',
+ '../../native_client/src/shared/srpc/srpc.gyp:srpc_lib',
+ '../../native_client/src/shared/platform/platform.gyp:platform_lib',
+ '../../native_client/src/untrusted/nacl/nacl.gyp:imc_syscalls_lib',
+ '../../native_client/src/shared/gio/gio.gyp:gio_lib',
+ ],
+ },
+ ],
+ }],
],
}
diff --git a/ppapi/ppapi_internal.gyp b/ppapi/ppapi_internal.gyp
index 6bf0565..4ad96e3 100644
--- a/ppapi/ppapi_internal.gyp
+++ b/ppapi/ppapi_internal.gyp
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 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.
@@ -29,4 +29,65 @@
'ppapi_shared.gypi',
'ppapi_tests.gypi',
],
+ 'targets': [
+ {
+ 'target_name': 'ppapi_shared',
+ 'type': '<(component)',
+ 'variables': {
+ 'ppapi_shared_target': 1,
+ },
+ 'dependencies': [
+ 'ppapi.gyp:ppapi_c',
+ '../base/base.gyp:base',
+ '../base/base.gyp:base_i18n',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../build/temp_gyp/googleurl.gyp:googleurl',
+ '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
+ '../gpu/gpu.gyp:command_buffer_client',
+ '../gpu/gpu.gyp:gles2_implementation',
+ '../net/net.gyp:net',
+ '../skia/skia.gyp:skia',
+ '../third_party/icu/icu.gyp:icuuc',
+ # TODO(ananta) : The WebKit dependency needs to move to a new target for NACL.
+ '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
+ '../ui/surface/surface.gyp:surface',
+ ],
+ 'export_dependent_settings': [
+ '../base/base.gyp:base',
+ '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
+ ],
+ 'conditions': [
+ ['OS=="mac"', {
+ 'link_settings': {
+ 'libraries': [
+ '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
+ ],
+ },
+ }],
+ ],
+ },
+ {
+ 'target_name': 'ppapi_proxy',
+ 'type': '<(component)',
+ 'variables': {
+ 'ppapi_proxy_target': 1,
+ },
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../gpu/gpu.gyp:gles2_implementation',
+ '../gpu/gpu.gyp:gpu_ipc',
+ '../ipc/ipc.gyp:ipc',
+ '../skia/skia.gyp:skia',
+ '../ui/surface/surface.gyp:surface',
+ 'ppapi.gyp:ppapi_c',
+ 'ppapi_shared',
+ ],
+ 'all_dependent_settings': {
+ 'include_dirs': [
+ '..',
+ ],
+ },
+ },
+ ]
}
diff --git a/ppapi/ppapi_proxy.gypi b/ppapi/ppapi_proxy.gypi
index c6b29d7..17a424d 100644
--- a/ppapi/ppapi_proxy.gypi
+++ b/ppapi/ppapi_proxy.gypi
@@ -3,178 +3,200 @@
# found in the LICENSE file.
{
- 'targets': [
- {
- 'target_name': 'ppapi_proxy',
- 'type': '<(component)',
- 'dependencies': [
- '../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../gpu/gpu.gyp:gles2_implementation',
- '../gpu/gpu.gyp:gpu_ipc',
- '../ipc/ipc.gyp:ipc',
- '../skia/skia.gyp:skia',
- '../ui/surface/surface.gyp:surface',
- 'ppapi.gyp:ppapi_c',
- 'ppapi_shared',
- ],
- 'all_dependent_settings': {
+ 'target_defaults': {
+ 'variables': {
+ 'ppapi_proxy_target': 0,
+ },
+ 'target_conditions': [
+ # This part is shared between the targets defined below.
+ ['ppapi_proxy_target==1', {
+ 'sources': [
+ # Take some standalone files from the C++ wrapper allowing us to more
+ # easily make async callbacks in the proxy. We can't depend on the
+ # full C++ wrappers at this layer since the C++ wrappers expect
+ # symbols defining the globals for "being a plugin" which we are not.
+ # These callback files are standalone.
+ 'cpp/completion_callback.h',
+ 'utility/completion_callback_factory.h',
+
+ 'proxy/broker_dispatcher.cc',
+ 'proxy/broker_dispatcher.h',
+ 'proxy/dispatcher.cc',
+ 'proxy/dispatcher.h',
+ 'proxy/enter_proxy.h',
+ 'proxy/host_dispatcher.cc',
+ 'proxy/host_dispatcher.h',
+ 'proxy/host_var_serialization_rules.cc',
+ 'proxy/host_var_serialization_rules.h',
+ 'proxy/interface_list.cc',
+ 'proxy/interface_list.h',
+ 'proxy/interface_proxy.cc',
+ 'proxy/interface_proxy.h',
+ 'proxy/pepper_file_messages.cc',
+ 'proxy/pepper_file_messages.h',
+ 'proxy/plugin_array_buffer_var.cc',
+ 'proxy/plugin_array_buffer_var.h',
+ 'proxy/plugin_dispatcher.cc',
+ 'proxy/plugin_dispatcher.h',
+ 'proxy/plugin_globals.cc',
+ 'proxy/plugin_globals.h',
+ 'proxy/plugin_main_nacl.cc',
+ 'proxy/plugin_message_filter.cc',
+ 'proxy/plugin_message_filter.h',
+ 'proxy/plugin_resource_tracker.cc',
+ 'proxy/plugin_resource_tracker.h',
+ 'proxy/plugin_var_serialization_rules.cc',
+ 'proxy/plugin_var_serialization_rules.h',
+ 'proxy/plugin_var_tracker.cc',
+ 'proxy/plugin_var_tracker.h',
+ 'proxy/ppapi_messages.cc',
+ 'proxy/ppapi_messages.h',
+ 'proxy/ppapi_command_buffer_proxy.h',
+ 'proxy/ppapi_command_buffer_proxy.cc',
+ 'proxy/ppapi_param_traits.cc',
+ 'proxy/ppapi_param_traits.h',
+ 'proxy/ppb_audio_input_proxy.cc',
+ 'proxy/ppb_audio_input_proxy.h',
+ 'proxy/ppb_audio_proxy.cc',
+ 'proxy/ppb_audio_proxy.h',
+ 'proxy/ppb_broker_proxy.cc',
+ 'proxy/ppb_broker_proxy.h',
+ 'proxy/ppb_buffer_proxy.cc',
+ 'proxy/ppb_buffer_proxy.h',
+ 'proxy/ppb_core_proxy.cc',
+ 'proxy/ppb_core_proxy.h',
+ 'proxy/ppb_file_chooser_proxy.cc',
+ 'proxy/ppb_file_chooser_proxy.h',
+ 'proxy/ppb_file_io_proxy.cc',
+ 'proxy/ppb_file_io_proxy.h',
+ 'proxy/ppb_file_ref_proxy.cc',
+ 'proxy/ppb_file_ref_proxy.h',
+ 'proxy/ppb_file_system_proxy.cc',
+ 'proxy/ppb_file_system_proxy.h',
+ 'proxy/ppb_flash_device_id_proxy.cc',
+ 'proxy/ppb_flash_device_id_proxy.h',
+ 'proxy/ppb_flash_proxy.cc',
+ 'proxy/ppb_flash_proxy.h',
+ 'proxy/ppb_flash_menu_proxy.cc',
+ 'proxy/ppb_flash_menu_proxy.h',
+ 'proxy/ppb_flash_message_loop_proxy.cc',
+ 'proxy/ppb_flash_message_loop_proxy.h',
+ 'proxy/ppb_graphics_2d_proxy.cc',
+ 'proxy/ppb_graphics_2d_proxy.h',
+ 'proxy/ppb_graphics_3d_proxy.cc',
+ 'proxy/ppb_graphics_3d_proxy.h',
+ 'proxy/ppb_host_resolver_private_proxy.cc',
+ 'proxy/ppb_host_resolver_private_proxy.h',
+ 'proxy/ppb_image_data_proxy.cc',
+ 'proxy/ppb_image_data_proxy.h',
+ 'proxy/ppb_instance_proxy.cc',
+ 'proxy/ppb_instance_proxy.h',
+ 'proxy/ppb_message_loop_proxy.cc',
+ 'proxy/ppb_message_loop_proxy.h',
+ 'proxy/ppb_network_monitor_private_proxy.cc',
+ 'proxy/ppb_network_monitor_private_proxy.h',
+ 'proxy/ppb_pdf_proxy.cc',
+ 'proxy/ppb_pdf_proxy.h',
+ 'proxy/ppb_talk_private_proxy.cc',
+ 'proxy/ppb_talk_private_proxy.h',
+ 'proxy/ppb_tcp_server_socket_private_proxy.cc',
+ 'proxy/ppb_tcp_server_socket_private_proxy.h',
+ 'proxy/ppb_tcp_socket_private_proxy.cc',
+ 'proxy/ppb_tcp_socket_private_proxy.h',
+ 'proxy/ppb_testing_proxy.cc',
+ 'proxy/ppb_testing_proxy.h',
+ 'proxy/ppb_udp_socket_private_proxy.cc',
+ 'proxy/ppb_udp_socket_private_proxy.h',
+ 'proxy/ppb_url_loader_proxy.cc',
+ 'proxy/ppb_url_loader_proxy.h',
+ 'proxy/ppb_url_response_info_proxy.cc',
+ 'proxy/ppb_url_response_info_proxy.h',
+ 'proxy/ppb_var_deprecated_proxy.cc',
+ 'proxy/ppb_var_deprecated_proxy.h',
+ 'proxy/ppb_video_capture_proxy.cc',
+ 'proxy/ppb_video_capture_proxy.h',
+ 'proxy/ppb_video_decoder_proxy.cc',
+ 'proxy/ppb_video_decoder_proxy.h',
+ 'proxy/ppb_x509_certificate_private_proxy.cc',
+ 'proxy/ppb_x509_certificate_private_proxy.h',
+ 'proxy/ppp_class_proxy.cc',
+ 'proxy/ppp_class_proxy.h',
+ 'proxy/ppp_graphics_3d_proxy.cc',
+ 'proxy/ppp_graphics_3d_proxy.h',
+ 'proxy/ppp_input_event_proxy.cc',
+ 'proxy/ppp_input_event_proxy.h',
+ 'proxy/ppp_instance_private_proxy.cc',
+ 'proxy/ppp_instance_private_proxy.h',
+ 'proxy/ppp_instance_proxy.cc',
+ 'proxy/ppp_instance_proxy.h',
+ 'proxy/ppp_messaging_proxy.cc',
+ 'proxy/ppp_messaging_proxy.h',
+ 'proxy/ppp_mouse_lock_proxy.cc',
+ 'proxy/ppp_mouse_lock_proxy.h',
+ 'proxy/ppp_printing_proxy.cc',
+ 'proxy/ppp_printing_proxy.h',
+ 'proxy/ppp_text_input_proxy.cc',
+ 'proxy/ppp_text_input_proxy.h',
+ 'proxy/ppp_video_decoder_proxy.cc',
+ 'proxy/ppp_video_decoder_proxy.h',
+ 'proxy/proxy_array_output.cc',
+ 'proxy/proxy_array_output.h',
+ 'proxy/proxy_channel.cc',
+ 'proxy/proxy_channel.h',
+ 'proxy/proxy_module.cc',
+ 'proxy/proxy_module.h',
+ 'proxy/proxy_object_var.cc',
+ 'proxy/proxy_object_var.h',
+ 'proxy/resource_creation_proxy.cc',
+ 'proxy/resource_creation_proxy.h',
+ 'proxy/serialized_flash_menu.cc',
+ 'proxy/serialized_flash_menu.h',
+ 'proxy/serialized_structs.cc',
+ 'proxy/serialized_structs.h',
+ 'proxy/serialized_var.cc',
+ 'proxy/serialized_var.h',
+ 'proxy/var_serialization_rules.h',
+ ],
+ 'defines': [
+ 'PPAPI_PROXY_IMPLEMENTATION',
+ ],
'include_dirs': [
- '..',
+ '..',
],
- },
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- # Take some standalong files from the C++ wrapper allowing us to more
- # easily make async callbacks in the proxy. We can't depend on the
- # full C++ wrappers at this layer since the C++ wrappers expect
- # symbols defining the globals for "being a plugin" which we are not.
- # These callback files are standalone.
- 'cpp/completion_callback.h',
- 'utility/completion_callback_factory.h',
-
- 'proxy/broker_dispatcher.cc',
- 'proxy/broker_dispatcher.h',
- 'proxy/dispatcher.cc',
- 'proxy/dispatcher.h',
- 'proxy/enter_proxy.h',
- 'proxy/host_dispatcher.cc',
- 'proxy/host_dispatcher.h',
- 'proxy/host_var_serialization_rules.cc',
- 'proxy/host_var_serialization_rules.h',
- 'proxy/interface_list.cc',
- 'proxy/interface_list.h',
- 'proxy/interface_proxy.cc',
- 'proxy/interface_proxy.h',
- 'proxy/pepper_file_messages.cc',
- 'proxy/pepper_file_messages.h',
- 'proxy/plugin_array_buffer_var.cc',
- 'proxy/plugin_array_buffer_var.h',
- 'proxy/plugin_dispatcher.cc',
- 'proxy/plugin_dispatcher.h',
- 'proxy/plugin_globals.cc',
- 'proxy/plugin_globals.h',
- 'proxy/plugin_message_filter.cc',
- 'proxy/plugin_message_filter.h',
- 'proxy/plugin_resource_tracker.cc',
- 'proxy/plugin_resource_tracker.h',
- 'proxy/plugin_var_serialization_rules.cc',
- 'proxy/plugin_var_serialization_rules.h',
- 'proxy/plugin_var_tracker.cc',
- 'proxy/plugin_var_tracker.h',
- 'proxy/ppapi_messages.cc',
- 'proxy/ppapi_messages.h',
- 'proxy/ppapi_command_buffer_proxy.h',
- 'proxy/ppapi_command_buffer_proxy.cc',
- 'proxy/ppapi_param_traits.cc',
- 'proxy/ppapi_param_traits.h',
- 'proxy/ppb_audio_input_proxy.cc',
- 'proxy/ppb_audio_input_proxy.h',
- 'proxy/ppb_audio_proxy.cc',
- 'proxy/ppb_audio_proxy.h',
- 'proxy/ppb_broker_proxy.cc',
- 'proxy/ppb_broker_proxy.h',
- 'proxy/ppb_buffer_proxy.cc',
- 'proxy/ppb_buffer_proxy.h',
- 'proxy/ppb_core_proxy.cc',
- 'proxy/ppb_core_proxy.h',
- 'proxy/ppb_file_chooser_proxy.cc',
- 'proxy/ppb_file_chooser_proxy.h',
- 'proxy/ppb_file_io_proxy.cc',
- 'proxy/ppb_file_io_proxy.h',
- 'proxy/ppb_file_ref_proxy.cc',
- 'proxy/ppb_file_ref_proxy.h',
- 'proxy/ppb_file_system_proxy.cc',
- 'proxy/ppb_file_system_proxy.h',
- 'proxy/ppb_flash_device_id_proxy.cc',
- 'proxy/ppb_flash_device_id_proxy.h',
- 'proxy/ppb_flash_proxy.cc',
- 'proxy/ppb_flash_proxy.h',
- 'proxy/ppb_flash_menu_proxy.cc',
- 'proxy/ppb_flash_menu_proxy.h',
- 'proxy/ppb_flash_message_loop_proxy.cc',
- 'proxy/ppb_flash_message_loop_proxy.h',
- 'proxy/ppb_graphics_2d_proxy.cc',
- 'proxy/ppb_graphics_2d_proxy.h',
- 'proxy/ppb_graphics_3d_proxy.cc',
- 'proxy/ppb_graphics_3d_proxy.h',
- 'proxy/ppb_host_resolver_private_proxy.cc',
- 'proxy/ppb_host_resolver_private_proxy.h',
- 'proxy/ppb_image_data_proxy.cc',
- 'proxy/ppb_image_data_proxy.h',
- 'proxy/ppb_instance_proxy.cc',
- 'proxy/ppb_instance_proxy.h',
- 'proxy/ppb_message_loop_proxy.cc',
- 'proxy/ppb_message_loop_proxy.h',
- 'proxy/ppb_network_monitor_private_proxy.cc',
- 'proxy/ppb_network_monitor_private_proxy.h',
- 'proxy/ppb_pdf_proxy.cc',
- 'proxy/ppb_pdf_proxy.h',
- 'proxy/ppb_talk_private_proxy.cc',
- 'proxy/ppb_talk_private_proxy.h',
- 'proxy/ppb_tcp_server_socket_private_proxy.cc',
- 'proxy/ppb_tcp_server_socket_private_proxy.h',
- 'proxy/ppb_tcp_socket_private_proxy.cc',
- 'proxy/ppb_tcp_socket_private_proxy.h',
- 'proxy/ppb_testing_proxy.cc',
- 'proxy/ppb_testing_proxy.h',
- 'proxy/ppb_udp_socket_private_proxy.cc',
- 'proxy/ppb_udp_socket_private_proxy.h',
- 'proxy/ppb_url_loader_proxy.cc',
- 'proxy/ppb_url_loader_proxy.h',
- 'proxy/ppb_url_response_info_proxy.cc',
- 'proxy/ppb_url_response_info_proxy.h',
- 'proxy/ppb_var_deprecated_proxy.cc',
- 'proxy/ppb_var_deprecated_proxy.h',
- 'proxy/ppb_video_capture_proxy.cc',
- 'proxy/ppb_video_capture_proxy.h',
- 'proxy/ppb_video_decoder_proxy.cc',
- 'proxy/ppb_video_decoder_proxy.h',
- 'proxy/ppb_x509_certificate_private_proxy.cc',
- 'proxy/ppb_x509_certificate_private_proxy.h',
- 'proxy/ppp_class_proxy.cc',
- 'proxy/ppp_class_proxy.h',
- 'proxy/ppp_graphics_3d_proxy.cc',
- 'proxy/ppp_graphics_3d_proxy.h',
- 'proxy/ppp_input_event_proxy.cc',
- 'proxy/ppp_input_event_proxy.h',
- 'proxy/ppp_instance_private_proxy.cc',
- 'proxy/ppp_instance_private_proxy.h',
- 'proxy/ppp_instance_proxy.cc',
- 'proxy/ppp_instance_proxy.h',
- 'proxy/ppp_messaging_proxy.cc',
- 'proxy/ppp_messaging_proxy.h',
- 'proxy/ppp_mouse_lock_proxy.cc',
- 'proxy/ppp_mouse_lock_proxy.h',
- 'proxy/ppp_printing_proxy.cc',
- 'proxy/ppp_printing_proxy.h',
- 'proxy/ppp_text_input_proxy.cc',
- 'proxy/ppp_text_input_proxy.h',
- 'proxy/ppp_video_decoder_proxy.cc',
- 'proxy/ppp_video_decoder_proxy.h',
- 'proxy/proxy_array_output.cc',
- 'proxy/proxy_array_output.h',
- 'proxy/proxy_channel.cc',
- 'proxy/proxy_channel.h',
- 'proxy/proxy_module.cc',
- 'proxy/proxy_module.h',
- 'proxy/proxy_object_var.cc',
- 'proxy/proxy_object_var.h',
- 'proxy/resource_creation_proxy.cc',
- 'proxy/resource_creation_proxy.h',
- 'proxy/serialized_flash_menu.cc',
- 'proxy/serialized_flash_menu.h',
- 'proxy/serialized_structs.cc',
- 'proxy/serialized_structs.h',
- 'proxy/serialized_var.cc',
- 'proxy/serialized_var.h',
- 'proxy/var_serialization_rules.h',
- ],
- 'defines': [
- 'PPAPI_PROXY_IMPLEMENTATION',
- ],
- },
- ],
+ 'target_conditions': [
+ ['>(nacl_untrusted_build)==1', {
+ 'sources!': [
+ 'proxy/broker_dispatcher.cc',
+ 'proxy/ppapi_command_buffer_proxy.cc',
+ 'proxy/ppb_audio_input_proxy.cc',
+ 'proxy/ppb_broker_proxy.cc',
+ 'proxy/ppb_buffer_proxy.cc',
+ 'proxy/ppb_file_chooser_proxy.cc',
+ 'proxy/ppb_flash_device_id_proxy.cc',
+ 'proxy/ppb_flash_proxy.cc',
+ 'proxy/ppb_flash_menu_proxy.cc',
+ 'proxy/ppb_flash_message_loop_proxy.cc',
+ 'proxy/ppb_graphics_2d_proxy.cc',
+ 'proxy/ppb_graphics_3d_proxy.cc',
+ 'proxy/ppb_host_resolver_private_proxy.cc',
+ 'proxy/ppb_network_monitor_private_proxy.cc',
+ 'proxy/ppb_pdf_proxy.cc',
+ 'proxy/ppb_talk_private_proxy.cc',
+ 'proxy/ppb_tcp_server_socket_private_proxy.cc',
+ 'proxy/ppb_tcp_socket_private_proxy.cc',
+ 'proxy/ppb_testing_proxy.cc',
+ 'proxy/ppb_udp_socket_private_proxy.cc',
+ 'proxy/ppb_video_capture_proxy.cc',
+ 'proxy/ppb_video_decoder_proxy.cc',
+ 'proxy/ppb_x509_certificate_private_proxy.cc',
+ 'proxy/ppp_graphics_3d_proxy.cc',
+ 'proxy/ppp_instance_private_proxy.cc',
+ 'proxy/ppp_video_decoder_proxy.cc',
+ 'proxy/serialized_flash_menu.cc',
+ ],
+ }],
+ ],
+ }],
+ ],
+ },
}
diff --git a/ppapi/ppapi_proxy_untrusted.gyp b/ppapi/ppapi_proxy_untrusted.gyp
index 24e0b27..d1f6910 100644
--- a/ppapi/ppapi_proxy_untrusted.gyp
+++ b/ppapi/ppapi_proxy_untrusted.gyp
@@ -2,15 +2,35 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# This is the "public" ppapi.gyp file, which must have dependencies on the
-# redistributable portions of PPAPI only. This prevents circular dependencies
-# in the .gyp files (since ppapi_internal depends on parts of Chrome).
-
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'includes': [
+ '../native_client/build/untrusted.gypi',
+ 'ppapi_proxy.gypi',
+ ],
'conditions': [
- ['disable_nacl==0 and build_ppapi_ipc_proxy_untrusted==1', {
- 'includes': ['ppapi_proxy_untrusted.gypi'],
+ ['disable_nacl==0 and disable_nacl_untrusted==0', {
+ 'targets': [
+ {
+ 'target_name': 'ppapi_proxy_untrusted',
+ 'type': 'none',
+ 'variables': {
+ 'ppapi_proxy_target': 1,
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libppapi_proxy_untrusted.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
+ '../base/base_untrusted.gyp:base_untrusted',
+ '../ipc/ipc_untrusted.gyp:ipc_untrusted',
+ '../ppapi/ppapi_shared_untrusted.gyp:ppapi_shared_untrusted',
+ ],
+ },
+ ],
}],
],
- 'targets': [],
}
diff --git a/ppapi/ppapi_proxy_untrusted.gypi b/ppapi/ppapi_proxy_untrusted.gypi
deleted file mode 100644
index 4985f76..0000000
--- a/ppapi/ppapi_proxy_untrusted.gypi
+++ /dev/null
@@ -1,416 +0,0 @@
-# Copyright (c) 2012 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.
-
-# This GYP file defines untrusted (NaCl) targets. All targets in this
-# file should be conditionally depended upon via 'disable_nacl!=1' to avoid
-# requiring NaCl sources for building.
-
-{
- 'includes': [
- '../native_client/build/common.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'base_untrusted',
- 'type': 'none',
- 'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- '<(DEPTH)/native_client/src/untrusted/pthread/pthread.gyp:pthread_lib',
- '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib_newlib',
- ],
- 'variables': {
- 'nlib_target': 'libbase_untrusted.a',
- 'build_glibc': 0,
- 'build_newlib': 1,
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- '../base/at_exit.cc',
- '../base/atomicops_internals_x86_gcc.cc',
-# '../base/base_paths.cc',
-# '../base/base_paths_posix.cc',
- '../base/bind_helpers.cc',
- '../base/build_time.cc',
- '../base/callback_internal.cc',
-# '../base/command_line.cc',
-# '../base/cpu.cc',
- '../base/debug/alias.cc',
- '../base/debug/debugger_posix.cc',
-# '../base/debug/stack_trace.cc',
- '../base/debug/trace_event.cc',
- '../base/debug/trace_event_impl.cc',
-# '../base/environment.cc',
- '../base/file_path.cc',
-# '../base/file_util.cc',
-# '../base/file_util_posix.cc',
-# '../base/file_util_proxy.cc',
- '../base/files/file_path_watcher.cc',
-# '../base/files/file_path_watcher_kqueue.cc',
- '../base/files/file_path_watcher_stub.cc',
-# '../base/global_descriptors_posix.cc',
- '../base/json/json_reader.cc',
- '../base/json/json_string_value_serializer.cc',
- '../base/json/json_writer.cc',
- '../base/json/string_escape.cc',
- '../base/lazy_instance.cc',
- '../base/location.cc',
- '../base/logging.cc',
- '../base/memory/ref_counted.cc',
- '../base/memory/ref_counted_memory.cc',
- '../base/memory/singleton.cc',
- '../base/memory/weak_ptr.cc',
- '../base/message_loop.cc',
- '../base/message_loop_proxy.cc',
- '../base/message_loop_proxy_impl.cc',
- '../base/message_pump.cc',
- '../base/message_pump_default.cc',
- '../base/metrics/histogram.cc',
- '../base/metrics/stats_counters.cc',
- '../base/metrics/stats_table.cc',
-# '../base/native_library_posix.cc',
- '../base/os_compat_nacl.cc',
-# '../base/path_service.cc',
- '../base/pending_task.cc',
- '../base/pickle.cc',
- '../base/platform_file.cc',
-# '../base/platform_file_posix.cc',
-# '../base/process_posix.cc',
-# '../base/process_util.cc',
-# '../base/process_util_posix.cc',
- '../base/profiler/alternate_timer.cc',
- '../base/profiler/scoped_profile.cc',
- '../base/profiler/tracked_time.cc',
- '../base/property_bag.cc',
- '../base/rand_util.cc',
- '../base/rand_util_nacl.cc',
- '../base/safe_strerror_posix.cc',
-# '../base/scoped_native_library.cc',
-# '../base/scoped_temp_dir.cc',
- '../base/sha1_portable.cc',
- '../base/shared_memory_nacl.cc',
- '../base/string_number_conversions.cc',
- '../base/string_piece.cc',
- '../base/string_split.cc',
- '../base/string_util.cc',
- '../base/string16.cc',
- '../base/stringprintf.cc',
- '../base/sync_socket_nacl.cc',
- '../base/synchronization/cancellation_flag.cc',
- '../base/synchronization/condition_variable_posix.cc',
- '../base/synchronization/lock.cc',
- '../base/synchronization/lock_impl_posix.cc',
- '../base/synchronization/waitable_event_posix.cc',
- '../base/synchronization/waitable_event_watcher_posix.cc',
- '../base/system_monitor/system_monitor.cc',
- '../base/system_monitor/system_monitor_posix.cc',
-# '../base/sys_info_posix.cc',
- '../base/sys_string_conversions_posix.cc',
- '../base/task_runner.cc',
- '../base/thread_task_runner_handle.cc',
- '../base/threading/non_thread_safe_impl.cc',
- '../base/threading/platform_thread_posix.cc',
- '../base/threading/post_task_and_reply_impl.cc',
-# '../base/threading/sequenced_worker_pool.cc',
- '../base/threading/simple_thread.cc',
- '../base/threading/thread.cc',
- '../base/threading/thread_checker_impl.cc',
- '../base/threading/thread_collision_warner.cc',
- '../base/threading/thread_local_posix.cc',
- '../base/threading/thread_local_storage_posix.cc',
- '../base/threading/thread_restrictions.cc',
- '../base/threading/watchdog.cc',
- '../base/threading/worker_pool.cc',
- '../base/threading/worker_pool_posix.cc',
- '../base/third_party/dmg_fp/g_fmt.cc',
- '../base/third_party/dmg_fp/dtoa_wrapper.cc',
- '../base/third_party/dynamic_annotations/dynamic_annotations.c',
- '../base/third_party/icu/icu_utf.cc',
- '../base/third_party/nspr/prtime.cc',
- '../base/time_posix.cc',
- '../base/time.cc',
- '../base/timer.cc',
- '../base/tracked_objects.cc',
- '../base/tracking_info.cc',
- '../base/utf_offset_string_conversions.cc',
- '../base/utf_string_conversion_utils.cc',
- '../base/utf_string_conversions.cc',
- '../base/values.cc',
- '../base/value_conversions.cc',
- '../base/version.cc',
- '../base/vlog.cc',
-# '../base/nix/mime_util_xdg.cc',
-# '../base/nix/xdg_util.cc',
- ],
- 'compile_flags': [
- '-pthread',
- ],
- },
- },
- {
- 'target_name': 'gpu_untrusted',
- 'type': 'none',
- 'dependencies': [
- 'base_untrusted',
- ],
- 'variables': {
- 'nlib_target': 'libgpu_untrusted.a',
- 'build_glibc': 0,
- 'build_newlib': 1,
- 'include_dirs': [
- '../gpu/command_buffer',
- '..',
- '../third_party/khronos',
- ],
- 'sources': [
- '../gpu/command_buffer/client/gles2_implementation.cc',
- '../gpu/command_buffer/client/program_info_manager.cc',
- '../gpu/command_buffer/common/gles2_cmd_utils.cc',
- '../gpu/command_buffer/common/logging.cc',
- '../gpu/command_buffer/common/cmd_buffer_common.cc',
- '../gpu/command_buffer/common/gles2_cmd_format.cc',
- '../gpu/command_buffer/common/id_allocator.cc',
- '../gpu/command_buffer/client/cmd_buffer_helper.cc',
- '../gpu/command_buffer/client/fenced_allocator.cc',
- '../gpu/command_buffer/client/mapped_memory.cc',
- '../gpu/command_buffer/client/ring_buffer.cc',
- '../gpu/command_buffer/client/transfer_buffer.cc',
- '../gpu/command_buffer/client/gles2_cmd_helper.cc',
- '../gpu/ipc/gpu_command_buffer_traits.cc',
- ],
- 'compile_flags': [
- '-pthread',
- ],
- 'link_flags': [
- '-pthread',
- '-lbase_untrusted',
- ],
- },
- },
- {
- 'target_name': 'ipc_untrusted',
- 'type': 'none',
- 'dependencies': [
- 'base_untrusted',
- '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:imc_syscalls_lib',
- ],
- 'variables': {
- 'nlib_target': 'libipc_untrusted.a',
- 'build_glibc': 0,
- 'build_newlib': 1,
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- '../ipc/file_descriptor_set_posix.cc',
- '../ipc/ipc_channel.cc',
- '../ipc/ipc_channel_nacl.cc',
- '../ipc/ipc_channel_proxy.cc',
- '../ipc/ipc_channel_reader.cc',
- '../ipc/ipc_logging.cc',
- '../ipc/ipc_message.cc',
- '../ipc/ipc_message_utils.cc',
- '../ipc/ipc_platform_file.cc',
- '../ipc/ipc_sync_channel.cc',
- '../ipc/ipc_sync_message.cc',
- '../ipc/ipc_sync_message_filter.cc',
- ],
- 'compile_flags': [
- '-pthread',
- ],
- 'link_flags': [
- '-pthread',
- '-lbase_untrusted',
- ],
- },
- },
- {
- 'target_name': 'ppapi_proxy_untrusted',
- 'type': 'none',
- 'dependencies': [
- 'base_untrusted',
- 'gpu_untrusted',
- 'ipc_untrusted',
- ],
- 'variables': {
- 'nexe_target': 'libppapi_proxy_untrusted.nexe',
- 'build_glibc': 0,
- 'build_newlib': 1,
- 'include_dirs': [
- '..',
- '../third_party/khronos',
- '../third_party/skia/include/config',
- ],
- 'sources': [
- 'shared_impl/callback_tracker.cc',
- 'shared_impl/file_type_conversion.cc',
- 'shared_impl/id_assignment.cc',
- 'shared_impl/platform_file.cc',
- 'shared_impl/ppapi_globals.cc',
- 'shared_impl/ppapi_preferences.cc',
- 'shared_impl/ppb_audio_config_shared.cc',
-# 'shared_impl/ppb_audio_input_shared.cc',
- 'shared_impl/ppb_audio_shared.cc',
- 'shared_impl/ppb_crypto_shared.cc',
- 'shared_impl/ppb_device_ref_shared.cc',
- 'shared_impl/ppb_file_io_shared.cc',
- 'shared_impl/ppb_file_ref_shared.cc',
-# 'shared_impl/ppb_graphics_3d_shared.cc',
- 'shared_impl/ppb_image_data_shared.cc',
- 'shared_impl/ppb_input_event_shared.cc',
- 'shared_impl/ppb_instance_shared.cc',
- 'shared_impl/ppb_memory_shared.cc',
-# 'shared_impl/ppb_opengles2_shared.cc',
- 'shared_impl/ppb_resource_array_shared.cc',
- 'shared_impl/ppb_url_request_info_shared.cc',
-# 'shared_impl/ppb_url_util_shared.cc',
- 'shared_impl/ppb_var_shared.cc',
-# 'shared_impl/ppb_video_decoder_shared.cc',
-# 'shared_impl/ppb_video_capture_shared.cc',
- 'shared_impl/ppb_view_shared.cc',
- 'shared_impl/ppp_instance_combined.cc',
- 'shared_impl/proxy_lock.cc',
- 'shared_impl/resource.cc',
- 'shared_impl/resource_tracker.cc',
- 'shared_impl/scoped_pp_resource.cc',
- 'shared_impl/time_conversion.cc',
- 'shared_impl/tracked_callback.cc',
- 'shared_impl/var.cc',
- 'shared_impl/var_tracker.cc',
-
- 'thunk/enter.cc',
- 'thunk/ppb_audio_config_thunk.cc',
-# 'thunk/ppb_audio_input_thunk.cc',
-# 'thunk/ppb_audio_input_trusted_thunk.cc',
- 'thunk/ppb_audio_thunk.cc',
-# 'thunk/ppb_audio_trusted_thunk.cc',
-# 'thunk/ppb_broker_thunk.cc',
-# 'thunk/ppb_browser_font_trusted_thunk.cc',
-# 'thunk/ppb_buffer_thunk.cc',
-# 'thunk/ppb_buffer_trusted_thunk.cc',
-# 'thunk/ppb_char_set_thunk.cc',
- 'thunk/ppb_console_thunk.cc',
- 'thunk/ppb_cursor_control_thunk.cc',
- 'thunk/ppb_device_ref_thunk.cc',
-# 'thunk/ppb_directory_reader_thunk.cc',
- 'thunk/ppb_input_event_thunk.cc',
-# 'thunk/ppb_file_chooser_thunk.cc',
- 'thunk/ppb_file_io_thunk.cc',
-# 'thunk/ppb_file_io_trusted_thunk.cc',
- 'thunk/ppb_file_ref_thunk.cc',
- 'thunk/ppb_file_system_thunk.cc',
- 'thunk/ppb_find_thunk.cc',
-# 'thunk/ppb_flash_clipboard_thunk.cc',
-# 'thunk/ppb_flash_fullscreen_thunk.cc',
-# 'thunk/ppb_flash_menu_thunk.cc',
-# 'thunk/ppb_flash_message_loop_thunk.cc',
- 'thunk/ppb_fullscreen_thunk.cc',
- 'thunk/ppb_gamepad_thunk.cc',
-# 'thunk/ppb_gles_chromium_texture_mapping_thunk.cc',
-# 'thunk/ppb_graphics_2d_thunk.cc',
-# 'thunk/ppb_graphics_3d_thunk.cc',
-# 'thunk/ppb_graphics_3d_trusted_thunk.cc',
-# 'thunk/ppb_host_resolver_private_thunk.cc',
- 'thunk/ppb_image_data_thunk.cc',
-# 'thunk/ppb_image_data_trusted_thunk.cc',
- 'thunk/ppb_instance_thunk.cc',
-# 'thunk/ppb_layer_compositor_thunk.cc',
- 'thunk/ppb_messaging_thunk.cc',
- 'thunk/ppb_mouse_lock_thunk.cc',
- 'thunk/ppb_resource_array_thunk.cc',
-# 'thunk/ppb_scrollbar_thunk.cc',
-# 'thunk/ppb_talk_private_thunk.cc',
-# 'thunk/ppb_tcp_server_socket_private_thunk.cc',
-# 'thunk/ppb_tcp_socket_private_thunk.cc',
- 'thunk/ppb_text_input_thunk.cc',
-# 'thunk/ppb_udp_socket_private_thunk.cc',
- 'thunk/ppb_url_loader_thunk.cc',
- 'thunk/ppb_url_request_info_thunk.cc',
- 'thunk/ppb_url_response_info_thunk.cc',
-# 'thunk/ppb_url_util_thunk.cc',
-# 'thunk/ppb_video_capture_thunk.cc',
-# 'thunk/ppb_video_decoder_thunk.cc',
-# 'thunk/ppb_video_layer_thunk.cc',
- 'thunk/ppb_view_thunk.cc',
-# 'thunk/ppb_websocket_thunk.cc',
- 'thunk/ppb_widget_thunk.cc',
-# 'thunk/ppb_x509_certificate_private_thunk.cc',
- 'thunk/ppb_zoom_thunk.cc',
-
-# 'proxy/broker_dispatcher.cc',
- 'proxy/dispatcher.cc',
- 'proxy/host_dispatcher.cc',
- 'proxy/host_var_serialization_rules.cc',
- 'proxy/interface_list.cc',
- 'proxy/interface_proxy.cc',
- 'proxy/pepper_file_messages.cc',
- 'proxy/plugin_array_buffer_var.cc',
- 'proxy/plugin_dispatcher.cc',
- 'proxy/plugin_globals.cc',
- 'proxy/plugin_message_filter.cc',
- 'proxy/plugin_resource_tracker.cc',
- 'proxy/plugin_var_serialization_rules.cc',
- 'proxy/plugin_var_tracker.cc',
- 'proxy/ppapi_messages.cc',
- 'proxy/ppapi_param_traits.cc',
-# 'proxy/ppb_audio_input_proxy.cc',
- 'proxy/ppb_audio_proxy.cc',
-# 'proxy/ppb_broker_proxy.cc',
-# 'proxy/ppb_buffer_proxy.cc',
- 'proxy/ppb_core_proxy.cc',
-# 'proxy/ppb_file_chooser_proxy.cc',
- 'proxy/ppb_file_io_proxy.cc',
- 'proxy/ppb_file_ref_proxy.cc',
- 'proxy/ppb_file_system_proxy.cc',
-# 'proxy/ppb_graphics_2d_proxy.cc',
-# 'proxy/ppb_graphics_3d_proxy.cc',
-# 'proxy/ppb_host_resolver_private_proxy.cc',
- 'proxy/ppb_image_data_proxy.cc',
- 'proxy/ppb_instance_proxy.cc',
- 'proxy/ppb_message_loop_proxy.cc',
-# 'proxy/ppb_network_monitor_private_proxy.cc',
-# 'proxy/ppb_pdf_proxy.cc',
-# 'proxy/ppb_talk_private_proxy.cc',
-# 'proxy/ppb_tcp_server_socket_private_proxy.cc',
-# 'proxy/ppb_tcp_socket_private_proxy.cc',
-# 'proxy/ppb_testing_proxy.cc',
-# 'proxy/ppb_udp_socket_private_proxy.cc',
- 'proxy/ppb_url_loader_proxy.cc',
- 'proxy/ppb_url_response_info_proxy.cc',
- 'proxy/ppb_var_deprecated_proxy.cc',
-# 'proxy/ppb_video_capture_proxy.cc',
-# 'proxy/ppb_video_decoder_proxy.cc',
- 'proxy/ppp_class_proxy.cc',
-# 'proxy/ppp_graphics_3d_proxy.cc',
- 'proxy/ppp_input_event_proxy.cc',
-# 'proxy/ppp_instance_private_proxy.cc',
- 'proxy/ppp_instance_proxy.cc',
- 'proxy/ppp_messaging_proxy.cc',
- 'proxy/ppp_mouse_lock_proxy.cc',
- 'proxy/ppp_printing_proxy.cc',
- 'proxy/ppp_text_input_proxy.cc',
-# 'proxy/ppp_video_decoder_proxy.cc',
- 'proxy/proxy_channel.cc',
- 'proxy/proxy_module.cc',
- 'proxy/proxy_object_var.cc',
- 'proxy/resource_creation_proxy.cc',
- 'proxy/serialized_structs.cc',
- 'proxy/serialized_var.cc',
- ],
- 'compile_flags': [
- '-pthread',
- ],
- 'link_flags': [
-# '-lppapi_cpp',
-# '-lppapi',
-# '-lppruntime',
- '-pthread',
- '-lgpu_untrusted',
- '-lipc_untrusted',
- '-lbase_untrusted',
- ],
- },
- },
- ],
-}
diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi
index 7cb5499..beecb34 100644
--- a/ppapi/ppapi_shared.gypi
+++ b/ppapi/ppapi_shared.gypi
@@ -3,266 +3,303 @@
# found in the LICENSE file.
{
- 'variables': {
- 'conditions': [
- ['inside_chromium_build==0', {
- 'webkit_src_dir': '../../../..',
- },{
- 'webkit_src_dir': '../third_party/WebKit',
- }],
- ],
+ 'variables': {
+ 'conditions': [
+ ['inside_chromium_build==0', {
+ 'webkit_src_dir': '../../../..',
+ },{
+ 'webkit_src_dir': '../third_party/WebKit',
+ }],
+ ],
+ },
+ 'target_defaults': {
+ 'variables': {
+ 'ppapi_shared_target': 0,
},
- 'targets': [
- {
- 'target_name': 'ppapi_shared',
- 'type': '<(component)',
- 'dependencies': [
- 'ppapi.gyp:ppapi_c',
- '../base/base.gyp:base',
- '../base/base.gyp:base_i18n',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../build/temp_gyp/googleurl.gyp:googleurl',
- '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
- '../gpu/gpu.gyp:command_buffer_client',
- '../gpu/gpu.gyp:gles2_implementation',
- '../net/net.gyp:net',
- '../skia/skia.gyp:skia',
- '../third_party/icu/icu.gyp:icuuc',
- # TODO(ananta) : The WebKit dependency needs to move to a new target for NACL.
- '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
- '../ui/surface/surface.gyp:surface',
- ],
- 'defines': [
- 'PPAPI_SHARED_IMPLEMENTATION',
- 'PPAPI_THUNK_IMPLEMENTATION',
- ],
- 'include_dirs': [
- '..',
- ],
- 'export_dependent_settings': [
- '../base/base.gyp:base',
- '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
- ],
- 'conditions': [
- ['OS=="mac"', {
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
- ],
- },
- }],
- ],
- 'sources': [
- 'shared_impl/array_writer.cc',
- 'shared_impl/array_writer.h',
- 'shared_impl/callback_tracker.cc',
- 'shared_impl/callback_tracker.h',
- 'shared_impl/file_path.cc',
- 'shared_impl/file_path.h',
- 'shared_impl/file_type_conversion.cc',
- 'shared_impl/file_type_conversion.h',
- 'shared_impl/host_resource.h',
- 'shared_impl/id_assignment.cc',
- 'shared_impl/id_assignment.h',
- 'shared_impl/platform_file.cc',
- 'shared_impl/platform_file.h',
- 'shared_impl/ppapi_globals.cc',
- 'shared_impl/ppapi_globals.h',
- 'shared_impl/ppapi_preferences.cc',
- 'shared_impl/ppapi_preferences.h',
- 'shared_impl/ppb_audio_config_shared.cc',
- 'shared_impl/ppb_audio_config_shared.h',
- 'shared_impl/ppb_audio_input_shared.cc',
- 'shared_impl/ppb_audio_input_shared.h',
- 'shared_impl/ppb_audio_shared.cc',
- 'shared_impl/ppb_audio_shared.h',
- 'shared_impl/ppb_crypto_shared.cc',
- 'shared_impl/ppb_device_ref_shared.cc',
- 'shared_impl/ppb_device_ref_shared.h',
- 'shared_impl/ppb_file_io_shared.cc',
- 'shared_impl/ppb_file_io_shared.h',
- 'shared_impl/ppb_file_ref_shared.cc',
- 'shared_impl/ppb_file_ref_shared.h',
- 'shared_impl/ppb_flash_shared.cc',
- 'shared_impl/ppb_flash_shared.h',
- 'shared_impl/ppb_graphics_3d_shared.cc',
- 'shared_impl/ppb_graphics_3d_shared.h',
- 'shared_impl/ppb_image_data_shared.cc',
- 'shared_impl/ppb_image_data_shared.h',
- 'shared_impl/ppb_input_event_shared.cc',
- 'shared_impl/ppb_input_event_shared.h',
- 'shared_impl/ppb_instance_shared.cc',
- 'shared_impl/ppb_instance_shared.h',
- 'shared_impl/ppb_memory_shared.cc',
- 'shared_impl/ppb_network_list_private_shared.cc',
- 'shared_impl/ppb_network_list_private_shared.h',
- 'shared_impl/ppb_opengles2_shared.cc',
- 'shared_impl/ppb_opengles2_shared.h',
- 'shared_impl/ppb_resource_array_shared.cc',
- 'shared_impl/ppb_resource_array_shared.h',
- 'shared_impl/ppb_url_request_info_shared.cc',
- 'shared_impl/ppb_url_request_info_shared.h',
- 'shared_impl/ppb_url_util_shared.cc',
- 'shared_impl/ppb_url_util_shared.h',
- 'shared_impl/ppb_var_shared.cc',
- 'shared_impl/ppb_var_shared.h',
- 'shared_impl/ppb_video_decoder_shared.cc',
- 'shared_impl/ppb_video_decoder_shared.h',
- 'shared_impl/ppb_video_capture_shared.cc',
- 'shared_impl/ppb_video_capture_shared.h',
- 'shared_impl/ppb_view_shared.cc',
- 'shared_impl/ppb_view_shared.h',
- 'shared_impl/ppp_flash_browser_operations_shared.h',
- 'shared_impl/ppp_instance_combined.cc',
- 'shared_impl/ppp_instance_combined.h',
- 'shared_impl/proxy_lock.cc',
- 'shared_impl/proxy_lock.h',
- 'shared_impl/resource.cc',
- 'shared_impl/resource.h',
- 'shared_impl/resource_tracker.cc',
- 'shared_impl/resource_tracker.h',
- 'shared_impl/scoped_pp_resource.cc',
- 'shared_impl/scoped_pp_resource.h',
- 'shared_impl/time_conversion.cc',
- 'shared_impl/time_conversion.h',
- 'shared_impl/tracked_callback.cc',
- 'shared_impl/tracked_callback.h',
- 'shared_impl/var.cc',
- 'shared_impl/var.h',
- 'shared_impl/var_tracker.cc',
- 'shared_impl/var_tracker.h',
- # TODO(viettrungluu): Split these out; it won't be used in NaCl.
- 'shared_impl/private/net_address_private_impl.cc',
- 'shared_impl/private/net_address_private_impl.h',
+ 'target_conditions': [
+ # This part is shared between the targets defined below.
+ ['ppapi_shared_target==1', {
+ 'sources': [
+ 'shared_impl/array_writer.cc',
+ 'shared_impl/array_writer.h',
+ 'shared_impl/callback_tracker.cc',
+ 'shared_impl/callback_tracker.h',
+ 'shared_impl/file_path.cc',
+ 'shared_impl/file_path.h',
+ 'shared_impl/file_type_conversion.cc',
+ 'shared_impl/file_type_conversion.h',
+ 'shared_impl/host_resource.h',
+ 'shared_impl/id_assignment.cc',
+ 'shared_impl/id_assignment.h',
+ 'shared_impl/platform_file.cc',
+ 'shared_impl/platform_file.h',
+ 'shared_impl/ppapi_globals.cc',
+ 'shared_impl/ppapi_globals.h',
+ 'shared_impl/ppapi_preferences.cc',
+ 'shared_impl/ppapi_preferences.h',
+ 'shared_impl/ppb_audio_config_shared.cc',
+ 'shared_impl/ppb_audio_config_shared.h',
+ 'shared_impl/ppb_audio_input_shared.cc',
+ 'shared_impl/ppb_audio_input_shared.h',
+ 'shared_impl/ppb_audio_shared.cc',
+ 'shared_impl/ppb_audio_shared.h',
+ 'shared_impl/ppb_crypto_shared.cc',
+ 'shared_impl/ppb_device_ref_shared.cc',
+ 'shared_impl/ppb_device_ref_shared.h',
+ 'shared_impl/ppb_file_io_shared.cc',
+ 'shared_impl/ppb_file_io_shared.h',
+ 'shared_impl/ppb_file_ref_shared.cc',
+ 'shared_impl/ppb_file_ref_shared.h',
+ 'shared_impl/ppb_flash_shared.cc',
+ 'shared_impl/ppb_flash_shared.h',
+ 'shared_impl/ppb_graphics_3d_shared.cc',
+ 'shared_impl/ppb_graphics_3d_shared.h',
+ 'shared_impl/ppb_image_data_shared.cc',
+ 'shared_impl/ppb_image_data_shared.h',
+ 'shared_impl/ppb_input_event_shared.cc',
+ 'shared_impl/ppb_input_event_shared.h',
+ 'shared_impl/ppb_instance_shared.cc',
+ 'shared_impl/ppb_instance_shared.h',
+ 'shared_impl/ppb_memory_shared.cc',
+ 'shared_impl/ppb_network_list_private_shared.cc',
+ 'shared_impl/ppb_network_list_private_shared.h',
+ 'shared_impl/ppb_opengles2_shared.cc',
+ 'shared_impl/ppb_opengles2_shared.h',
+ 'shared_impl/ppb_resource_array_shared.cc',
+ 'shared_impl/ppb_resource_array_shared.h',
+ 'shared_impl/ppb_url_request_info_shared.cc',
+ 'shared_impl/ppb_url_request_info_shared.h',
+ 'shared_impl/ppb_url_util_shared.cc',
+ 'shared_impl/ppb_url_util_shared.h',
+ 'shared_impl/ppb_var_shared.cc',
+ 'shared_impl/ppb_var_shared.h',
+ 'shared_impl/ppb_video_decoder_shared.cc',
+ 'shared_impl/ppb_video_decoder_shared.h',
+ 'shared_impl/ppb_video_capture_shared.cc',
+ 'shared_impl/ppb_video_capture_shared.h',
+ 'shared_impl/ppb_view_shared.cc',
+ 'shared_impl/ppb_view_shared.h',
+ 'shared_impl/ppp_flash_browser_operations_shared.h',
+ 'shared_impl/ppp_instance_combined.cc',
+ 'shared_impl/ppp_instance_combined.h',
+ 'shared_impl/proxy_lock.cc',
+ 'shared_impl/proxy_lock.h',
+ 'shared_impl/resource.cc',
+ 'shared_impl/resource.h',
+ 'shared_impl/resource_tracker.cc',
+ 'shared_impl/resource_tracker.h',
+ 'shared_impl/scoped_pp_resource.cc',
+ 'shared_impl/scoped_pp_resource.h',
+ 'shared_impl/time_conversion.cc',
+ 'shared_impl/time_conversion.h',
+ 'shared_impl/tracked_callback.cc',
+ 'shared_impl/tracked_callback.h',
+ 'shared_impl/var.cc',
+ 'shared_impl/var.h',
+ 'shared_impl/var_tracker.cc',
+ 'shared_impl/var_tracker.h',
+ # TODO(viettrungluu): Split these out; it won't be used in NaCl.
+ 'shared_impl/private/net_address_private_impl.cc',
+ 'shared_impl/private/net_address_private_impl.h',
- 'shared_impl/private/ppb_browser_font_trusted_shared.cc',
- 'shared_impl/private/ppb_browser_font_trusted_shared.h',
- 'shared_impl/private/ppb_char_set_shared.cc',
- 'shared_impl/private/ppb_char_set_shared.h',
- 'shared_impl/private/ppb_host_resolver_shared.cc',
- 'shared_impl/private/ppb_host_resolver_shared.h',
- 'shared_impl/private/ppb_tcp_server_socket_shared.cc',
- 'shared_impl/private/ppb_tcp_server_socket_shared.h',
- 'shared_impl/private/ppb_x509_certificate_private_shared.cc',
- 'shared_impl/private/ppb_x509_certificate_private_shared.h',
- 'shared_impl/private/tcp_socket_private_impl.cc',
- 'shared_impl/private/tcp_socket_private_impl.h',
- 'shared_impl/private/udp_socket_private_impl.cc',
- 'shared_impl/private/udp_socket_private_impl.h',
+ 'shared_impl/private/ppb_browser_font_trusted_shared.cc',
+ 'shared_impl/private/ppb_browser_font_trusted_shared.h',
+ 'shared_impl/private/ppb_char_set_shared.cc',
+ 'shared_impl/private/ppb_char_set_shared.h',
+ 'shared_impl/private/ppb_host_resolver_shared.cc',
+ 'shared_impl/private/ppb_host_resolver_shared.h',
+ 'shared_impl/private/ppb_tcp_server_socket_shared.cc',
+ 'shared_impl/private/ppb_tcp_server_socket_shared.h',
+ 'shared_impl/private/ppb_x509_certificate_private_shared.cc',
+ 'shared_impl/private/ppb_x509_certificate_private_shared.h',
+ 'shared_impl/private/tcp_socket_private_impl.cc',
+ 'shared_impl/private/tcp_socket_private_impl.h',
+ 'shared_impl/private/udp_socket_private_impl.cc',
+ 'shared_impl/private/udp_socket_private_impl.h',
- 'thunk/enter.cc',
- 'thunk/enter.h',
- 'thunk/ppb_audio_api.h',
- 'thunk/ppb_audio_config_api.h',
- 'thunk/ppb_audio_config_thunk.cc',
- 'thunk/ppb_audio_input_api.h',
- 'thunk/ppb_audio_input_thunk.cc',
- 'thunk/ppb_audio_input_trusted_thunk.cc',
- 'thunk/ppb_audio_thunk.cc',
- 'thunk/ppb_audio_trusted_thunk.cc',
- 'thunk/ppb_broker_api.h',
- 'thunk/ppb_broker_thunk.cc',
- 'thunk/ppb_browser_font_trusted_api.h',
- 'thunk/ppb_browser_font_trusted_thunk.cc',
- 'thunk/ppb_buffer_api.h',
- 'thunk/ppb_buffer_thunk.cc',
- 'thunk/ppb_buffer_trusted_api.h',
- 'thunk/ppb_buffer_trusted_thunk.cc',
- 'thunk/ppb_char_set_thunk.cc',
- 'thunk/ppb_console_thunk.cc',
- 'thunk/ppb_cursor_control_thunk.cc',
- 'thunk/ppb_device_ref_api.h',
- 'thunk/ppb_device_ref_thunk.cc',
- 'thunk/ppb_directory_reader_api.h',
- 'thunk/ppb_directory_reader_thunk.cc',
- 'thunk/ppb_file_chooser_api.h',
- 'thunk/ppb_file_chooser_thunk.cc',
- 'thunk/ppb_file_io_api.h',
- 'thunk/ppb_file_io_thunk.cc',
- 'thunk/ppb_file_io_trusted_thunk.cc',
- 'thunk/ppb_file_ref_api.h',
- 'thunk/ppb_file_ref_thunk.cc',
- 'thunk/ppb_file_system_api.h',
- 'thunk/ppb_file_system_thunk.cc',
- 'thunk/ppb_find_thunk.cc',
- 'thunk/ppb_flash_api.h',
- 'thunk/ppb_flash_clipboard_thunk.cc',
- 'thunk/ppb_flash_device_id_api.h',
- 'thunk/ppb_flash_device_id_thunk.cc',
- 'thunk/ppb_flash_file_fileref_thunk.cc',
- 'thunk/ppb_flash_file_modulelocal_thunk.cc',
- 'thunk/ppb_flash_fullscreen_thunk.cc',
- 'thunk/ppb_flash_menu_api.h',
- 'thunk/ppb_flash_menu_thunk.cc',
- 'thunk/ppb_flash_message_loop_api.h',
- 'thunk/ppb_flash_message_loop_thunk.cc',
- 'thunk/ppb_flash_thunk.cc',
- 'thunk/ppb_fullscreen_thunk.cc',
- 'thunk/ppb_gamepad_thunk.cc',
- 'thunk/ppb_gles_chromium_texture_mapping_thunk.cc',
- 'thunk/ppb_graphics_2d_api.h',
- 'thunk/ppb_graphics_2d_thunk.cc',
- 'thunk/ppb_graphics_3d_api.h',
- 'thunk/ppb_graphics_3d_thunk.cc',
- 'thunk/ppb_graphics_3d_trusted_thunk.cc',
- 'thunk/ppb_host_resolver_private_api.h',
- 'thunk/ppb_host_resolver_private_thunk.cc',
- 'thunk/ppb_image_data_api.h',
- 'thunk/ppb_image_data_thunk.cc',
- 'thunk/ppb_image_data_trusted_thunk.cc',
- 'thunk/ppb_input_event_api.h',
- 'thunk/ppb_input_event_thunk.cc',
- 'thunk/ppb_instance_api.h',
- 'thunk/ppb_instance_thunk.cc',
- 'thunk/ppb_layer_compositor_api.h',
- 'thunk/ppb_layer_compositor_thunk.cc',
- 'thunk/ppb_message_loop_api.h',
- 'thunk/ppb_messaging_thunk.cc',
- 'thunk/ppb_mouse_cursor_thunk.cc',
- 'thunk/ppb_mouse_lock_thunk.cc',
- 'thunk/ppb_network_list_private_api.h',
- 'thunk/ppb_network_list_private_thunk.cc',
- 'thunk/ppb_network_monitor_private_api.h',
- 'thunk/ppb_network_monitor_private_thunk.cc',
- 'thunk/ppb_pdf_api.h',
- 'thunk/ppb_printing_thunk.cc',
- 'thunk/ppb_resource_array_api.h',
- 'thunk/ppb_resource_array_thunk.cc',
- 'thunk/ppb_scrollbar_api.h',
- 'thunk/ppb_scrollbar_thunk.cc',
- 'thunk/ppb_talk_private_api.h',
- 'thunk/ppb_talk_private_thunk.cc',
- 'thunk/ppb_tcp_server_socket_private_api.h',
- 'thunk/ppb_tcp_server_socket_private_thunk.cc',
- 'thunk/ppb_tcp_socket_private_api.h',
- 'thunk/ppb_tcp_socket_private_thunk.cc',
- 'thunk/ppb_text_input_thunk.cc',
- 'thunk/ppb_udp_socket_private_api.h',
- 'thunk/ppb_udp_socket_private_thunk.cc',
- 'thunk/ppb_url_loader_api.h',
- 'thunk/ppb_url_loader_thunk.cc',
- 'thunk/ppb_url_request_info_api.h',
- 'thunk/ppb_url_request_info_thunk.cc',
- 'thunk/ppb_url_response_info_api.h',
- 'thunk/ppb_url_response_info_thunk.cc',
- 'thunk/ppb_url_util_thunk.cc',
- 'thunk/ppb_video_capture_api.h',
- 'thunk/ppb_video_capture_thunk.cc',
- 'thunk/ppb_video_decoder_api.h',
- 'thunk/ppb_video_decoder_thunk.cc',
- 'thunk/ppb_video_layer_api.h',
- 'thunk/ppb_video_layer_thunk.cc',
- 'thunk/ppb_view_api.h',
- 'thunk/ppb_view_thunk.cc',
- 'thunk/ppb_websocket_api.h',
- 'thunk/ppb_websocket_thunk.cc',
- 'thunk/ppb_widget_api.h',
- 'thunk/ppb_widget_thunk.cc',
- 'thunk/ppb_x509_certificate_private_api.h',
- 'thunk/ppb_x509_certificate_private_thunk.cc',
- 'thunk/ppb_zoom_thunk.cc',
- 'thunk/thunk.h',
- ],
- },
- ],
+ 'thunk/enter.cc',
+ 'thunk/enter.h',
+ 'thunk/ppb_audio_api.h',
+ 'thunk/ppb_audio_config_api.h',
+ 'thunk/ppb_audio_config_thunk.cc',
+ 'thunk/ppb_audio_input_api.h',
+ 'thunk/ppb_audio_input_thunk.cc',
+ 'thunk/ppb_audio_input_trusted_thunk.cc',
+ 'thunk/ppb_audio_thunk.cc',
+ 'thunk/ppb_audio_trusted_thunk.cc',
+ 'thunk/ppb_broker_api.h',
+ 'thunk/ppb_broker_thunk.cc',
+ 'thunk/ppb_browser_font_trusted_api.h',
+ 'thunk/ppb_browser_font_trusted_thunk.cc',
+ 'thunk/ppb_buffer_api.h',
+ 'thunk/ppb_buffer_thunk.cc',
+ 'thunk/ppb_buffer_trusted_api.h',
+ 'thunk/ppb_buffer_trusted_thunk.cc',
+ 'thunk/ppb_char_set_thunk.cc',
+ 'thunk/ppb_console_thunk.cc',
+ 'thunk/ppb_cursor_control_thunk.cc',
+ 'thunk/ppb_device_ref_api.h',
+ 'thunk/ppb_device_ref_thunk.cc',
+ 'thunk/ppb_directory_reader_api.h',
+ 'thunk/ppb_directory_reader_thunk.cc',
+ 'thunk/ppb_file_chooser_api.h',
+ 'thunk/ppb_file_chooser_thunk.cc',
+ 'thunk/ppb_file_io_api.h',
+ 'thunk/ppb_file_io_thunk.cc',
+ 'thunk/ppb_file_io_trusted_thunk.cc',
+ 'thunk/ppb_file_ref_api.h',
+ 'thunk/ppb_file_ref_thunk.cc',
+ 'thunk/ppb_file_system_api.h',
+ 'thunk/ppb_file_system_thunk.cc',
+ 'thunk/ppb_find_thunk.cc',
+ 'thunk/ppb_flash_api.h',
+ 'thunk/ppb_flash_clipboard_thunk.cc',
+ 'thunk/ppb_flash_device_id_api.h',
+ 'thunk/ppb_flash_device_id_thunk.cc',
+ 'thunk/ppb_flash_file_fileref_thunk.cc',
+ 'thunk/ppb_flash_file_modulelocal_thunk.cc',
+ 'thunk/ppb_flash_fullscreen_thunk.cc',
+ 'thunk/ppb_flash_menu_api.h',
+ 'thunk/ppb_flash_menu_thunk.cc',
+ 'thunk/ppb_flash_message_loop_api.h',
+ 'thunk/ppb_flash_message_loop_thunk.cc',
+ 'thunk/ppb_flash_thunk.cc',
+ 'thunk/ppb_fullscreen_thunk.cc',
+ 'thunk/ppb_gamepad_thunk.cc',
+ 'thunk/ppb_gles_chromium_texture_mapping_thunk.cc',
+ 'thunk/ppb_graphics_2d_api.h',
+ 'thunk/ppb_graphics_2d_thunk.cc',
+ 'thunk/ppb_graphics_3d_api.h',
+ 'thunk/ppb_graphics_3d_thunk.cc',
+ 'thunk/ppb_graphics_3d_trusted_thunk.cc',
+ 'thunk/ppb_host_resolver_private_api.h',
+ 'thunk/ppb_host_resolver_private_thunk.cc',
+ 'thunk/ppb_image_data_api.h',
+ 'thunk/ppb_image_data_thunk.cc',
+ 'thunk/ppb_image_data_trusted_thunk.cc',
+ 'thunk/ppb_input_event_api.h',
+ 'thunk/ppb_input_event_thunk.cc',
+ 'thunk/ppb_instance_api.h',
+ 'thunk/ppb_instance_thunk.cc',
+ 'thunk/ppb_layer_compositor_api.h',
+ 'thunk/ppb_layer_compositor_thunk.cc',
+ 'thunk/ppb_message_loop_api.h',
+ 'thunk/ppb_messaging_thunk.cc',
+ 'thunk/ppb_mouse_cursor_thunk.cc',
+ 'thunk/ppb_mouse_lock_thunk.cc',
+ 'thunk/ppb_network_list_private_api.h',
+ 'thunk/ppb_network_list_private_thunk.cc',
+ 'thunk/ppb_network_monitor_private_api.h',
+ 'thunk/ppb_network_monitor_private_thunk.cc',
+ 'thunk/ppb_pdf_api.h',
+ 'thunk/ppb_printing_thunk.cc',
+ 'thunk/ppb_resource_array_api.h',
+ 'thunk/ppb_resource_array_thunk.cc',
+ 'thunk/ppb_scrollbar_api.h',
+ 'thunk/ppb_scrollbar_thunk.cc',
+ 'thunk/ppb_talk_private_api.h',
+ 'thunk/ppb_talk_private_thunk.cc',
+ 'thunk/ppb_tcp_server_socket_private_api.h',
+ 'thunk/ppb_tcp_server_socket_private_thunk.cc',
+ 'thunk/ppb_tcp_socket_private_api.h',
+ 'thunk/ppb_tcp_socket_private_thunk.cc',
+ 'thunk/ppb_text_input_thunk.cc',
+ 'thunk/ppb_udp_socket_private_api.h',
+ 'thunk/ppb_udp_socket_private_thunk.cc',
+ 'thunk/ppb_url_loader_api.h',
+ 'thunk/ppb_url_loader_thunk.cc',
+ 'thunk/ppb_url_request_info_api.h',
+ 'thunk/ppb_url_request_info_thunk.cc',
+ 'thunk/ppb_url_response_info_api.h',
+ 'thunk/ppb_url_response_info_thunk.cc',
+ 'thunk/ppb_url_util_thunk.cc',
+ 'thunk/ppb_video_capture_api.h',
+ 'thunk/ppb_video_capture_thunk.cc',
+ 'thunk/ppb_video_decoder_api.h',
+ 'thunk/ppb_video_decoder_thunk.cc',
+ 'thunk/ppb_video_layer_api.h',
+ 'thunk/ppb_video_layer_thunk.cc',
+ 'thunk/ppb_view_api.h',
+ 'thunk/ppb_view_thunk.cc',
+ 'thunk/ppb_websocket_api.h',
+ 'thunk/ppb_websocket_thunk.cc',
+ 'thunk/ppb_widget_api.h',
+ 'thunk/ppb_widget_thunk.cc',
+ 'thunk/ppb_x509_certificate_private_api.h',
+ 'thunk/ppb_x509_certificate_private_thunk.cc',
+ 'thunk/ppb_zoom_thunk.cc',
+ 'thunk/thunk.h',
+ ],
+ 'defines': [
+ 'PPAPI_SHARED_IMPLEMENTATION',
+ 'PPAPI_THUNK_IMPLEMENTATION',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ 'target_conditions': [
+ ['>(nacl_untrusted_build)==1', {
+ 'sources!': [
+ 'shared_impl/ppb_audio_input_shared.cc',
+ 'shared_impl/ppb_graphics_3d_shared.cc',
+ 'shared_impl/ppb_image_data_shared.cc',
+ 'shared_impl/ppb_opengles2_shared.cc',
+ 'shared_impl/ppb_url_util_shared.cc',
+ 'shared_impl/ppb_video_decoder_shared.cc',
+ 'shared_impl/ppb_video_capture_shared.cc',
+ 'shared_impl/private/net_address_private_impl.cc',
+ 'shared_impl/private/ppb_browser_font_trusted_shared.cc',
+ 'shared_impl/private/ppb_char_set_shared.cc',
+ 'shared_impl/private/ppb_host_resolver_shared.cc',
+ 'shared_impl/private/ppb_tcp_server_socket_shared.cc',
+ 'shared_impl/private/ppb_x509_certificate_private_shared.cc',
+ 'shared_impl/private/tcp_socket_private_impl.cc',
+ 'shared_impl/private/udp_socket_private_impl.cc',
+ 'thunk/ppb_audio_input_thunk.cc',
+ 'thunk/ppb_audio_input_trusted_thunk.cc',
+ 'thunk/ppb_audio_trusted_thunk.cc',
+ 'thunk/ppb_broker_thunk.cc',
+ 'thunk/ppb_browser_font_trusted_thunk.cc',
+ 'thunk/ppb_buffer_thunk.cc',
+ 'thunk/ppb_buffer_trusted_thunk.cc',
+ 'thunk/ppb_char_set_thunk.cc',
+ 'thunk/ppb_directory_reader_thunk.cc',
+ 'thunk/ppb_file_chooser_thunk.cc',
+ 'thunk/ppb_file_io_trusted_thunk.cc',
+ 'thunk/ppb_flash_clipboard_thunk.cc',
+ 'thunk/ppb_flash_device_id_thunk.cc',
+ 'thunk/ppb_flash_file_fileref_thunk.cc',
+ 'thunk/ppb_flash_file_modulelocal_thunk.cc',
+ 'thunk/ppb_flash_fullscreen_thunk.cc',
+ 'thunk/ppb_flash_menu_thunk.cc',
+ 'thunk/ppb_flash_message_loop_thunk.cc',
+ 'thunk/ppb_flash_thunk.cc',
+ 'thunk/ppb_flash_message_loop_thunk.cc',
+ 'thunk/ppb_gles_chromium_texture_mapping_thunk.cc',
+ 'thunk/ppb_graphics_2d_thunk.cc',
+ 'thunk/ppb_graphics_3d_thunk.cc',
+ 'thunk/ppb_graphics_3d_trusted_thunk.cc',
+ 'thunk/ppb_host_resolver_private_thunk.cc',
+ 'thunk/ppb_image_data_trusted_thunk.cc',
+ 'thunk/ppb_layer_compositor_thunk.cc',
+ 'thunk/ppb_network_list_private_thunk.cc',
+ 'thunk/ppb_network_monitor_private_thunk.cc',
+ 'thunk/ppb_scrollbar_thunk.cc',
+ 'thunk/ppb_talk_private_thunk.cc',
+ 'thunk/ppb_tcp_server_socket_private_thunk.cc',
+ 'thunk/ppb_tcp_socket_private_thunk.cc',
+ 'thunk/ppb_transport_thunk.cc',
+ 'thunk/ppb_udp_socket_private_thunk.cc',
+ 'thunk/ppb_url_util_thunk.cc',
+ 'thunk/ppb_video_capture_thunk.cc',
+ 'thunk/ppb_video_decoder_thunk.cc',
+ 'thunk/ppb_video_layer_thunk.cc',
+ 'thunk/ppb_websocket_thunk.cc',
+ 'thunk/ppb_x509_certificate_private_thunk.cc',
+ ],
+ }],
+ ],
+ }],
+ ],
+ },
}
diff --git a/ppapi/ppapi_shared_untrusted.gyp b/ppapi/ppapi_shared_untrusted.gyp
new file mode 100644
index 0000000..2da5616
--- /dev/null
+++ b/ppapi/ppapi_shared_untrusted.gyp
@@ -0,0 +1,35 @@
+# Copyright (c) 2012 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': {
+ 'chromium_code': 1,
+ },
+ 'includes': [
+ '../native_client/build/untrusted.gypi',
+ 'ppapi_shared.gypi',
+ ],
+ 'conditions': [
+ ['disable_nacl==0 and disable_nacl_untrusted==0', {
+ 'targets': [
+ {
+ 'target_name': 'ppapi_shared_untrusted',
+ 'type': 'none',
+ 'variables': {
+ 'ppapi_shared_target': 1,
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libppapi_shared_untrusted.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
+ '../base/base_untrusted.gyp:base_untrusted',
+ '../ipc/ipc_untrusted.gyp:ipc_untrusted',
+ ],
+ },
+ ],
+ }],
+ ],
+}
diff --git a/ppapi/proxy/DEPS b/ppapi/proxy/DEPS
index 28be7cc..4fd421d 100644
--- a/ppapi/proxy/DEPS
+++ b/ppapi/proxy/DEPS
@@ -11,6 +11,10 @@ include_rules = [
# dependencies, so we allow that (and the output traits it depends on).
"-ppapi/cpp",
"+ppapi/cpp/completion_callback.h",
- "+ppapi/cpp/output_traits.h"
+ "+ppapi/cpp/output_traits.h",
+
+ # The untrusted build references the NaCl integrated runtime (IRT).
+ "+native_client/src/shared",
+ "+native_client/src/untrusted"
]
diff --git a/ppapi/proxy/plugin_main_nacl.cc b/ppapi/proxy/plugin_main_nacl.cc
new file mode 100644
index 0000000..9182731
--- /dev/null
+++ b/ppapi/proxy/plugin_main_nacl.cc
@@ -0,0 +1,140 @@
+// Copyright (c) 2012 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 <map>
+#include <set>
+
+#include "build/build_config.h"
+// Need to include this before most other files because it defines
+// IPC_MESSAGE_LOG_ENABLED. We need to use it to define
+// IPC_MESSAGE_MACROS_LOG_ENABLED so ppapi_messages.h will generate the
+// ViewMsgLog et al. functions.
+
+#include "base/message_loop.h"
+#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread.h"
+#include "ipc/ipc_channel_handle.h"
+#include "ipc/ipc_logging.h"
+#include "ipc/ipc_message.h"
+#include "native_client/src/shared/ppapi_proxy/ppruntime.h"
+#include "native_client/src/untrusted/irt/irt_ppapi.h"
+#include "ppapi/c/ppp.h"
+#include "ppapi/c/ppp_instance.h"
+#include "ppapi/proxy/plugin_dispatcher.h"
+#include "ppapi/proxy/plugin_globals.h"
+
+#if defined(IPC_MESSAGE_LOG_ENABLED)
+#define IPC_MESSAGE_MACROS_LOG_ENABLED
+#include "ppapi/proxy/ppapi_messages.h"
+#endif
+
+// This must match up with NACL_CHROME_INITIAL_IPC_DESC,
+// defined in sel_main_chrome.h
+#define NACL_IPC_FD 6
+
+using ppapi::proxy::PluginDispatcher;
+using ppapi::proxy::PluginGlobals;
+
+namespace {
+
+struct PP_ThreadFunctions thread_funcs;
+
+// Copied from src/content/ppapi_plugin/ppapi_thread. This is a minimal
+// implementation to get us started.
+class PluginDispatcherDelegate : public PluginDispatcher::PluginDelegate {
+ public:
+ explicit PluginDispatcherDelegate(
+ scoped_refptr<base::MessageLoopProxy> io_loop)
+ : message_loop_(io_loop),
+ shutdown_event_(true, false) {
+ }
+
+ virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE {
+ return message_loop_.get();
+ }
+
+ virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE {
+ return &shutdown_event_;
+ }
+
+ virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
+ base::PlatformFile handle,
+ const IPC::SyncChannel& channel,
+ bool should_close_source) OVERRIDE {
+ return IPC::InvalidPlatformFileForTransit();
+ }
+
+ virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE {
+ return &instances_;
+ }
+
+ virtual uint32 Register(PluginDispatcher* plugin_dispatcher) OVERRIDE {
+ if (!plugin_dispatcher ||
+ plugin_dispatchers_.size() >= std::numeric_limits<uint32>::max()) {
+ return 0;
+ }
+
+ uint32 id = 0;
+ do {
+ // Although it is unlikely, make sure that we won't cause any trouble when
+ // the counter overflows.
+ id = next_plugin_dispatcher_id_++;
+ } while (id == 0 ||
+ plugin_dispatchers_.find(id) != plugin_dispatchers_.end());
+ plugin_dispatchers_[id] = plugin_dispatcher;
+ return id;
+ }
+
+ virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE {
+ plugin_dispatchers_.erase(plugin_dispatcher_id);
+ }
+
+ private:
+ std::set<PP_Instance> instances_;
+ std::map<uint32, PluginDispatcher*> plugin_dispatchers_;
+ uint32 next_plugin_dispatcher_id_;
+ scoped_refptr<base::MessageLoopProxy> message_loop_;
+ base::WaitableEvent shutdown_event_;
+};
+
+} // namespace
+
+void PpapiPluginRegisterThreadCreator(
+ const struct PP_ThreadFunctions* new_funcs) {
+ thread_funcs = *new_funcs;
+}
+
+int IrtInit() {
+ return 0;
+}
+
+int PpapiPluginMain() {
+ base::AtExitManager exit_manager;
+ MessageLoop loop;
+ IPC::Logging::set_log_function_map(&g_log_function_mapping);
+ ppapi::proxy::PluginGlobals plugin_globals;
+ base::Thread io_thread("Chrome_NaClIOThread");
+ base::Thread::Options options;
+ options.message_loop_type = MessageLoop::TYPE_IO;
+ io_thread.StartWithOptions(options);
+
+ int32_t error = ::PPP_InitializeModule(
+ 0 /* module */,
+ &ppapi::proxy::PluginDispatcher::GetBrowserInterface);
+ // TODO(dmichael): Handle other error conditions, like failure to connect?
+ if (error)
+ return error;
+
+ PluginDispatcherDelegate delegate(io_thread.message_loop_proxy());
+
+ // TODO(dmichael) Figure out how to determine if we're in incognito
+ PluginDispatcher dispatcher(::PPP_GetInterface, false /* incognito */);
+ IPC::ChannelHandle channel_handle("NaCl IPC",
+ base::FileDescriptor(NACL_IPC_FD, false));
+ dispatcher.InitPluginWithChannel(&delegate, channel_handle, false);
+
+ loop.Run();
+ return 0;
+}
+
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index 5f3c6bd..cd54ae9 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -846,6 +846,7 @@ IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics2D_ReplaceContents,
IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics2D_Flush,
ppapi::HostResource /* graphics_2d */)
+#if !defined(OS_NACL)
// PPB_Graphics3D.
IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBGraphics3D_Create,
PP_Instance /* instance */,
@@ -884,6 +885,7 @@ IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBGraphics3D_GetTransferBuffer,
uint32 /* size */)
IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_SwapBuffers,
ppapi::HostResource /* graphics_3d */)
+#endif // !defined(OS_NACL)
// PPB_ImageData.
IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_Create,