summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-01 19:37:52 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-01 19:37:52 +0000
commitb0b91c06bc2ed6afc0611f00d68f72b19dd06d26 (patch)
tree90c3e24a254e81fbc7634dcab65900b9bceeb1bf
parent6640985c37f3a375a08d781c4ff309e6deaaafbc (diff)
downloadchromium_src-b0b91c06bc2ed6afc0611f00d68f72b19dd06d26.zip
chromium_src-b0b91c06bc2ed6afc0611f00d68f72b19dd06d26.tar.gz
chromium_src-b0b91c06bc2ed6afc0611f00d68f72b19dd06d26.tar.bz2
Pepper: Remove trusted plugin loadable module.
This change links the trusted plugin into the renderer, making it easier for the trusted plugin to use libraries in Chromium. This removes the ppGoogleNaClPlugin loadable module file on various platforms. This is part of a larger effort to remove the "trusted plugin" used to bootstrap NaCl plugins. It introduces an "internal_module" interface for setting the value returned by pp::Module::Get(). This is so that both the trusted plugin and the remoting plugin can be linked into the renderer. However, I believe this is safe because the trusted plugin runs in-process and the remoting plugin runs out-of-process. BUG=394497 R=dmichael@chromium.org, mseaborn@chromium.org, phajdan.jr@chromium.org, thestig@chromium.org, wez@chromium.org Review URL: https://codereview.chromium.org/397243004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287071 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser_tests.isolate1
-rw-r--r--chrome/chrome.isolate2
-rw-r--r--chrome/chrome_common.gypi1
-rw-r--r--chrome/chrome_dll_bundle.gypi3
-rw-r--r--chrome/chrome_installer.gypi1
-rw-r--r--chrome/chrome_tests.gypi2
-rw-r--r--chrome/common/DEPS1
-rw-r--r--chrome/common/chrome_content_client.cc46
-rw-r--r--chrome/common/chrome_paths.cc13
-rw-r--r--chrome/installer/linux/common/installer.include5
-rw-r--r--chrome/installer/mini_installer.gyp2
-rw-r--r--chrome/installer/mini_installer.gypi1
-rw-r--r--chrome/installer/mini_installer/chrome.release1
-rw-r--r--chrome/interactive_ui_tests.isolate1
-rwxr-xr-xchrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh1
-rw-r--r--chrome/test/nacl/nacl_browsertest_util.cc5
-rw-r--r--chrome/test/ppapi/ppapi_test.cc7
-rw-r--r--chrome/tools/build/chromeos/FILES.cfg4
-rw-r--r--chrome/tools/build/linux/FILES.cfg4
-rwxr-xr-xchrome/tools/build/mac/dump_product_syms1
-rw-r--r--chrome/tools/build/win/FILES.cfg10
-rw-r--r--chrome/unit_tests.isolate3
-rw-r--r--components/nacl.gyp2
-rw-r--r--ppapi/BUILD.gn7
-rw-r--r--ppapi/cpp/private/internal_module.cc21
-rw-r--r--ppapi/cpp/private/internal_module.h16
-rw-r--r--ppapi/native_client/src/trusted/plugin/osx_ppapi/Info.plist46
-rw-r--r--ppapi/native_client/src/trusted/plugin/osx_ppapi/ppNaClPlugin.r15
-rw-r--r--ppapi/native_client/src/trusted/plugin/plugin.gyp66
-rw-r--r--ppapi/native_client/src/trusted/plugin/plugin.gypi1
-rw-r--r--ppapi/native_client/src/trusted/plugin/ppapi.def3
-rw-r--r--ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.cc39
-rw-r--r--ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h21
-rw-r--r--ppapi/native_client/src/trusted/plugin/win/nacl_plugin.rc102
-rw-r--r--ppapi/ppapi_cpp.gypi14
-rw-r--r--remoting/client/plugin/pepper_entrypoints.cc15
-rw-r--r--remoting/remoting_client.gypi1
37 files changed, 163 insertions, 321 deletions
diff --git a/chrome/browser_tests.isolate b/chrome/browser_tests.isolate
index 48bf0c9..b08f29e 100644
--- a/chrome/browser_tests.isolate
+++ b/chrome/browser_tests.isolate
@@ -141,7 +141,6 @@
'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/keyboard_resources.pak',
'<(PRODUCT_DIR)/libexif.so',
- '<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so',
'<(PRODUCT_DIR)/nacl_helper',
'<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
'browser/chromeos/login/test/https_forwarder.py',
diff --git a/chrome/chrome.isolate b/chrome/chrome.isolate
index f03f3e3..d85689d 100644
--- a/chrome/chrome.isolate
+++ b/chrome/chrome.isolate
@@ -8,7 +8,6 @@
'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/libffmpegsumo.so',
'<(PRODUCT_DIR)/libosmesa.so',
- '<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so',
'<(PRODUCT_DIR)/nacl_helper<(EXECUTABLE_SUFFIX)',
'<(PRODUCT_DIR)/nacl_helper_bootstrap<(EXECUTABLE_SUFFIX)',
],
@@ -64,7 +63,6 @@
'<(PRODUCT_DIR)/libexif.dll',
'<(PRODUCT_DIR)/nacl64<(EXECUTABLE_SUFFIX)',
'<(PRODUCT_DIR)/osmesa.dll',
- '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll',
],
},
}],
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index 3b2279e..ddbb2c1 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -418,6 +418,7 @@
['disable_nacl==0', {
'dependencies': [
'<(DEPTH)/components/nacl.gyp:nacl_common',
+ '<(DEPTH)/ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
],
'sources': [
'common/extensions/manifest_handlers/nacl_modules_handler.cc',
diff --git a/chrome/chrome_dll_bundle.gypi b/chrome/chrome_dll_bundle.gypi
index 81ed0b9..e307c3b 100644
--- a/chrome/chrome_dll_bundle.gypi
+++ b/chrome/chrome_dll_bundle.gypi
@@ -152,9 +152,6 @@
],
'conditions': [
['disable_nacl!=1', {
- 'files': [
- '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.plugin',
- ],
'conditions': [
['target_arch=="x64"', {
'files': [
diff --git a/chrome/chrome_installer.gypi b/chrome/chrome_installer.gypi
index 8281e21..0ff518c 100644
--- a/chrome/chrome_installer.gypi
+++ b/chrome/chrome_installer.gypi
@@ -457,7 +457,6 @@
'<(PRODUCT_DIR)/chrome_sandbox',
'<(PRODUCT_DIR)/libffmpegsumo.so',
'<(PRODUCT_DIR)/libpdf.so',
- '<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so',
'<(PRODUCT_DIR)/xdg-mime',
'<(PRODUCT_DIR)/xdg-settings',
'<(PRODUCT_DIR)/locales/en-US.pak',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 5d37751..6256a0f 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1689,7 +1689,7 @@
],
'dependencies': [
# Runtime dependency.
- '../ppapi/native_client/src/trusted/plugin/plugin.gyp:ppGoogleNaClPluginChrome',
+ '../ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
],
'conditions': [
['disable_nacl_untrusted==0', {
diff --git a/chrome/common/DEPS b/chrome/common/DEPS
index 33b3554..c019e61 100644
--- a/chrome/common/DEPS
+++ b/chrome/common/DEPS
@@ -20,6 +20,7 @@ include_rules = [
"+google_apis/gaia", # For gaia_switches.h
"+grit", # For generated headers
"+media",
+ "+ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h",
"+ppapi/shared_impl",
"+remoting/client/plugin",
"+webkit/common/user_agent",
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index c8dd84f..cb1e988 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -49,6 +49,10 @@
#include "components/nacl/common/nacl_sandbox_type_mac.h"
#endif
+#if !defined(DISABLE_NACL)
+#include "ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h"
+#endif
+
#if defined(ENABLE_REMOTING)
#include "remoting/client/plugin/pepper_entrypoints.h"
#endif
@@ -70,6 +74,7 @@ const char kPDFPluginOutOfProcessMimeType[] =
const uint32 kPDFPluginPermissions = ppapi::PERMISSION_PRIVATE |
ppapi::PERMISSION_DEV;
+#if !defined(DISABLE_NACL)
const char kNaClPluginMimeType[] = "application/x-nacl";
const char kNaClPluginExtension[] = "";
const char kNaClPluginDescription[] = "Native Client Executable";
@@ -79,6 +84,7 @@ const uint32 kNaClPluginPermissions = ppapi::PERMISSION_PRIVATE |
const char kPnaclPluginMimeType[] = "application/x-pnacl";
const char kPnaclPluginExtension[] = "";
const char kPnaclPluginDescription[] = "Portable Native Client Executable";
+#endif // !defined(DISABLE_NACL)
const char kO1DPluginName[] = "Google Talk Plugin Video Renderer";
const char kO1DPluginMimeType[] ="application/o1d";
@@ -166,30 +172,34 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
}
}
+#if !defined(DISABLE_NACL)
// Handle Native Client just like the PDF plugin. This means that it is
// enabled by default for the non-portable case. This allows apps installed
// from the Chrome Web Store to use NaCl even if the command line switch
// isn't set. For other uses of NaCl we check for the command line switch.
- static bool skip_nacl_file_check = false;
if (PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) {
- if (skip_nacl_file_check || base::PathExists(path)) {
- content::PepperPluginInfo nacl;
- nacl.path = path;
- nacl.name = ChromeContentClient::kNaClPluginName;
- content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType,
- kNaClPluginExtension,
- kNaClPluginDescription);
- nacl.mime_types.push_back(nacl_mime_type);
- content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType,
- kPnaclPluginExtension,
- kPnaclPluginDescription);
- nacl.mime_types.push_back(pnacl_mime_type);
- nacl.permissions = kNaClPluginPermissions;
- plugins->push_back(nacl);
-
- skip_nacl_file_check = true;
- }
+ content::PepperPluginInfo nacl;
+ // The nacl plugin is now built into the Chromium binary.
+ nacl.is_internal = true;
+ nacl.path = path;
+ nacl.name = ChromeContentClient::kNaClPluginName;
+ content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType,
+ kNaClPluginExtension,
+ kNaClPluginDescription);
+ nacl.mime_types.push_back(nacl_mime_type);
+ content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType,
+ kPnaclPluginExtension,
+ kPnaclPluginDescription);
+ nacl.mime_types.push_back(pnacl_mime_type);
+ nacl.internal_entry_points.get_interface = nacl_plugin::PPP_GetInterface;
+ nacl.internal_entry_points.initialize_module =
+ nacl_plugin::PPP_InitializeModule;
+ nacl.internal_entry_points.shutdown_module =
+ nacl_plugin::PPP_ShutdownModule;
+ nacl.permissions = kNaClPluginPermissions;
+ plugins->push_back(nacl);
}
+#endif // !defined(DISABLE_NACL)
static bool skip_o1d_file_check = false;
if (PathService::Get(chrome::FILE_O1D_PLUGIN, &path)) {
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index df5df2f..63972ea 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -60,16 +60,8 @@ const base::FilePath::CharType kInternalPDFPluginFileName[] =
FILE_PATH_LITERAL("libpdf.so");
#endif
-// File name of the internal NaCl plugin on different platforms.
const base::FilePath::CharType kInternalNaClPluginFileName[] =
-#if defined(OS_WIN)
- FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll");
-#elif defined(OS_MACOSX)
- // TODO(noelallen) Please verify this extention name is correct.
- FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin");
-#else // Linux and Chrome OS
- FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so");
-#endif
+ FILE_PATH_LITERAL("internal-nacl-plugin");
const base::FilePath::CharType kEffectsPluginFileName[] =
#if defined(OS_WIN)
@@ -312,6 +304,9 @@ bool PathProvider(int key, base::FilePath* result) {
return false;
cur = cur.Append(kEffectsPluginFileName);
break;
+ // TODO(teravest): Remove this case once the internal NaCl plugin is gone.
+ // We currently need a path here to look up whether the plugin is disabled
+ // and what its permissions are.
case chrome::FILE_NACL_PLUGIN:
if (!GetInternalPluginsDirectory(&cur))
return false;
diff --git a/chrome/installer/linux/common/installer.include b/chrome/installer/linux/common/installer.include
index a316906..2f6b321c 100644
--- a/chrome/installer/linux/common/installer.include
+++ b/chrome/installer/linux/common/installer.include
@@ -177,11 +177,6 @@ stage_install_common() {
install -m 644 -s "${BUILDDIR}/lib/libpeerconnection.so" "${STAGEDIR}/${INSTALLDIR}/lib/"
fi
- # nacl pepper plugin
- if [ -f "${BUILDDIR}/libppGoogleNaClPluginChrome.so" ]; then
- install -m 644 -s "${BUILDDIR}/libppGoogleNaClPluginChrome.so" "${STAGEDIR}/${INSTALLDIR}/"
- fi
-
# nacl_helper and nacl_helper_bootstrap
# Don't use "-s" (strip) because this runs binutils "strip", which
# mangles the special ELF program headers of nacl_helper_bootstrap.
diff --git a/chrome/installer/mini_installer.gyp b/chrome/installer/mini_installer.gyp
index 115e847..2fba2e0 100644
--- a/chrome/installer/mini_installer.gyp
+++ b/chrome/installer/mini_installer.gyp
@@ -198,7 +198,6 @@
['disable_nacl==1', {
'inputs!': [
'<(PRODUCT_DIR)/nacl64.exe',
- '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll',
'<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
'<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
],
@@ -231,7 +230,6 @@
'<(PRODUCT_DIR)/chrome.exe',
'<(PRODUCT_DIR)/chrome.dll',
'<(PRODUCT_DIR)/nacl64.exe',
- '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll',
'<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
'<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
'<(PRODUCT_DIR)/locales/en-US.pak',
diff --git a/chrome/installer/mini_installer.gypi b/chrome/installer/mini_installer.gypi
index c43a339..c5ae0b0 100644
--- a/chrome/installer/mini_installer.gypi
+++ b/chrome/installer/mini_installer.gypi
@@ -185,7 +185,6 @@
'<(PRODUCT_DIR)/chrome.exe',
'<@(chrome_dll_path)',
'<(PRODUCT_DIR)/nacl64.exe',
- '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll',
'<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
'<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
'<(PRODUCT_DIR)/locales/en-US.pak',
diff --git a/chrome/installer/mini_installer/chrome.release b/chrome/installer/mini_installer/chrome.release
index fcacc38..522980f 100644
--- a/chrome/installer/mini_installer/chrome.release
+++ b/chrome/installer/mini_installer/chrome.release
@@ -34,7 +34,6 @@ nacl64.exe: %(VersionDir)s\
nacl_irt_x86_32.nexe: %(VersionDir)s\
nacl_irt_x86_64.nexe: %(VersionDir)s\
pdf.dll: %(VersionDir)s\
-ppGoogleNaClPluginChrome.dll: %(VersionDir)s\
resources.pak: %(VersionDir)s\
syzyasan_rtl.dll: %(VersionDir)s\
xinput1_3.dll: %(VersionDir)s\
diff --git a/chrome/interactive_ui_tests.isolate b/chrome/interactive_ui_tests.isolate
index 88209c2..d854b5a 100644
--- a/chrome/interactive_ui_tests.isolate
+++ b/chrome/interactive_ui_tests.isolate
@@ -79,7 +79,6 @@
'<(PRODUCT_DIR)/ffmpegsumo.dll',
'<(PRODUCT_DIR)/libEGL.dll',
'<(PRODUCT_DIR)/libGLESv2.dll',
- '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll',
'<(PRODUCT_DIR)/osmesa.dll',
],
'isolate_dependency_untracked': [
diff --git a/chrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh
index 48ef6e7..a47b005 100755
--- a/chrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh
+++ b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh
@@ -21,7 +21,6 @@ ln -f -s /opt/google/chrome/*.pak "$this_dir/"
ln -f -s /opt/google/chrome/nacl_helper "$this_dir/"
ln -f -s /opt/google/chrome/nacl_helper_bootstrap "$this_dir/"
ln -f -s /opt/google/chrome/nacl_irt_*.nexe "$this_dir/"
-ln -f -s /opt/google/chrome/libppGoogleNaClPluginChrome.so "$this_dir/"
# Create links to resources from pyauto_dep.
diff --git a/chrome/test/nacl/nacl_browsertest_util.cc b/chrome/test/nacl/nacl_browsertest_util.cc
index f3ebefec..2112893 100644
--- a/chrome/test/nacl/nacl_browsertest_util.cc
+++ b/chrome/test/nacl/nacl_browsertest_util.cc
@@ -199,11 +199,6 @@ void NaClBrowserTestBase::SetUpCommandLine(base::CommandLine* command_line) {
}
void NaClBrowserTestBase::SetUpOnMainThread() {
- // Sanity check.
- base::FilePath plugin_lib;
- ASSERT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
- ASSERT_TRUE(base::PathExists(plugin_lib)) << plugin_lib.value();
-
ASSERT_TRUE(StartTestServer()) << "Cannot start test server.";
}
diff --git a/chrome/test/ppapi/ppapi_test.cc b/chrome/test/ppapi/ppapi_test.cc
index 9a95145..1e35de1 100644
--- a/chrome/test/ppapi/ppapi_test.cc
+++ b/chrome/test/ppapi/ppapi_test.cc
@@ -342,9 +342,6 @@ void PPAPINaClTest::SetUpCommandLine(base::CommandLine* command_line) {
}
void PPAPINaClTest::SetUpOnMainThread() {
- base::FilePath plugin_lib;
- EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
- EXPECT_TRUE(base::PathExists(plugin_lib));
}
void PPAPINaClTest::RunTest(const std::string& test_case) {
@@ -464,8 +461,4 @@ std::string PPAPINaClTestDisallowedSockets::BuildQuery(
void PPAPIBrokerInfoBarTest::SetUpOnMainThread() {
// The default content setting for the PPAPI broker is ASK. We purposefully
// don't call PPAPITestBase::SetUpOnMainThread() to keep it that way.
-
- base::FilePath plugin_lib;
- EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
- EXPECT_TRUE(base::PathExists(plugin_lib));
}
diff --git a/chrome/tools/build/chromeos/FILES.cfg b/chrome/tools/build/chromeos/FILES.cfg
index 2088df8..801a5a7 100644
--- a/chrome/tools/build/chromeos/FILES.cfg
+++ b/chrome/tools/build/chromeos/FILES.cfg
@@ -120,10 +120,6 @@ FILES = [
},
# Native Client plugin files:
{
- 'filename': 'libppGoogleNaClPluginChrome.so',
- 'buildtype': ['dev', 'official'],
- },
- {
'filename': 'nacl_irt_x86_32.nexe',
'arch': ['32bit'],
'buildtype': ['dev', 'official'],
diff --git a/chrome/tools/build/linux/FILES.cfg b/chrome/tools/build/linux/FILES.cfg
index 249fa4c..10069a2 100644
--- a/chrome/tools/build/linux/FILES.cfg
+++ b/chrome/tools/build/linux/FILES.cfg
@@ -129,10 +129,6 @@ FILES = [
},
# Native Client plugin files:
{
- 'filename': 'libppGoogleNaClPluginChrome.so',
- 'buildtype': ['dev', 'official'],
- },
- {
'filename': 'nacl_irt_x86_32.nexe',
'arch': ['32bit'],
'buildtype': ['dev', 'official'],
diff --git a/chrome/tools/build/mac/dump_product_syms b/chrome/tools/build/mac/dump_product_syms
index 9382929..b610f96 100755
--- a/chrome/tools/build/mac/dump_product_syms
+++ b/chrome/tools/build/mac/dump_product_syms
@@ -83,7 +83,6 @@ SRC_NAMES=(
"crash_report_sender.app"
"exif.so"
"ffmpegsumo.so"
- "ppGoogleNaClPluginChrome.plugin"
)
# PDF.plugin is optional. Only include it if present.
diff --git a/chrome/tools/build/win/FILES.cfg b/chrome/tools/build/win/FILES.cfg
index d72849f..866d93b 100644
--- a/chrome/tools/build/win/FILES.cfg
+++ b/chrome/tools/build/win/FILES.cfg
@@ -381,11 +381,6 @@ FILES = [
},
# Native Client plugin files:
{
- 'filename': 'ppGoogleNaClPluginChrome.dll',
- 'buildtype': ['dev', 'official'],
- 'filegroup': ['default', 'symsrc'],
- },
- {
'filename': 'nacl_irt_x86_32.nexe',
'arch': ['32bit'],
'buildtype': ['dev', 'official'],
@@ -703,11 +698,6 @@ FILES = [
'archive': 'chrome-win32-syms.zip',
},
{
- 'filename': 'ppGoogleNaClPluginChrome.dll.pdb',
- 'buildtype': ['dev', 'official'],
- 'archive': 'chrome-win32-syms.zip',
- },
- {
'filename': 'setup.exe.pdb',
'buildtype': ['dev', 'official'],
'archive': 'chrome-win32-syms.zip',
diff --git a/chrome/unit_tests.isolate b/chrome/unit_tests.isolate
index f1f7298..9d0191a 100644
--- a/chrome/unit_tests.isolate
+++ b/chrome/unit_tests.isolate
@@ -52,9 +52,6 @@
'<(PRODUCT_DIR)/locales/fr.pak',
'<(PRODUCT_DIR)/xdisplaycheck<(EXECUTABLE_SUFFIX)',
],
- 'isolate_dependency_touched': [
- '<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so',
- ],
},
}],
['OS=="linux" or OS=="mac" or OS=="win"', {
diff --git a/components/nacl.gyp b/components/nacl.gyp
index a9933ca..2620b11 100644
--- a/components/nacl.gyp
+++ b/components/nacl.gyp
@@ -78,7 +78,6 @@
'../base/base.gyp:base',
'../base/base.gyp:base_static',
'../ipc/ipc.gyp:ipc',
- '../ppapi/native_client/src/trusted/plugin/plugin.gyp:ppGoogleNaClPluginChrome',
'../ppapi/ppapi_internal.gyp:ppapi_shared',
'../ppapi/ppapi_internal.gyp:ppapi_ipc',
'../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome',
@@ -183,6 +182,7 @@
],
'dependencies': [
'../content/content.gyp:content_renderer',
+ '../ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
'../third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
'../third_party/WebKit/public/blink.gyp:blink',
],
diff --git a/ppapi/BUILD.gn b/ppapi/BUILD.gn
index af9e02e..c0a4768 100644
--- a/ppapi/BUILD.gn
+++ b/ppapi/BUILD.gn
@@ -54,6 +54,13 @@ source_set("ppapi_cpp") {
]
}
+source_set("ppapi_internal_module") {
+ sources = [
+ "cpp/private/internal_module.cc",
+ "cpp/private/internal_module.h",
+ ]
+}
+
source_set("ppapi_gles2") {
sources = [
"lib/gl/gles2/gl2ext_ppapi.c",
diff --git a/ppapi/cpp/private/internal_module.cc b/ppapi/cpp/private/internal_module.cc
new file mode 100644
index 0000000..1615e87
--- /dev/null
+++ b/ppapi/cpp/private/internal_module.cc
@@ -0,0 +1,21 @@
+// Copyright (c) 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.
+
+#include "ppapi/cpp/module.h"
+#include "ppapi/cpp/private/internal_module.h"
+
+namespace pp {
+namespace {
+static Module* g_module_singleton = NULL;
+} // namespace
+
+Module* Module::Get() {
+ return g_module_singleton;
+}
+
+void InternalSetModuleSingleton(Module* module) {
+ g_module_singleton = module;
+}
+
+} // namespace pp
diff --git a/ppapi/cpp/private/internal_module.h b/ppapi/cpp/private/internal_module.h
new file mode 100644
index 0000000..5bc4191
--- /dev/null
+++ b/ppapi/cpp/private/internal_module.h
@@ -0,0 +1,16 @@
+// Copyright (c) 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 PPAPI_CPP_PRIVATE_INTERNAL_MODULE_H_
+#define PPAPI_CPP_PRIVATE_INTERNAL_MODULE_H_
+
+namespace pp {
+class Module;
+
+// Forcibly sets the value returned by pp::Module::Get(). Do not call this
+// function except to support the trusted plugin or the remoting plugin!
+void InternalSetModuleSingleton(Module* module);
+}
+
+#endif // PPAPI_CPP_PRIVATE_INTERNAL_MODULE_H_
diff --git a/ppapi/native_client/src/trusted/plugin/osx_ppapi/Info.plist b/ppapi/native_client/src/trusted/plugin/osx_ppapi/Info.plist
deleted file mode 100644
index b066504..0000000
--- a/ppapi/native_client/src/trusted/plugin/osx_ppapi/Info.plist
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>ppNaClPlugin</string>
- <key>CFBundleIdentifier</key>
- <string>com.google.ppNaClPlugin</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>BRPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>nacl</string>
- <key>CFBundleVersion</key>
- <string>0.1</string>
- <key>CFPlugInDynamicRegisterFunction</key>
- <string></string>
- <key>CFPlugInDynamicRegistration</key>
- <string>NO</string>
- <key>CFPlugInUnloadFunction</key>
- <string></string>
- <key>WebPluginDescription</key>
- <string>ppNaClPlugin</string>
- <key>NSPrincipalClass</key>
- <string>ppNaClPlugin</string>
- <key>WebPluginMIMETypes</key>
- <dict>
- <key>application/x-nacl</key>
- <dict>
- <key>WebPluginTypeDescription</key>
- <string>PPAPI Native Client SimpleRPC interaction</string>
- <key>WebPluginExtensions</key>
- <array>
- <string>nexe,nacl</string>
- </array>
- </dict>
- </dict>
- <key>WebPluginName</key>
- <string>Google Native Client Plugin</string>
-</dict>
-</plist>
diff --git a/ppapi/native_client/src/trusted/plugin/osx_ppapi/ppNaClPlugin.r b/ppapi/native_client/src/trusted/plugin/osx_ppapi/ppNaClPlugin.r
deleted file mode 100644
index af3f807..0000000
--- a/ppapi/native_client/src/trusted/plugin/osx_ppapi/ppNaClPlugin.r
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <CoreServices/CoreServices.r>
-
-resource 'STR#' (126) { {
- "PPAPI NativeClient",
- "PPAPI NativeClient Plug-in"
-} };
-
-resource 'STR#' (127) { {
- "PPAPI NativeClient Module - SRPC",
-} };
-
-resource 'STR#' (128) { {
- "application/x-nacl",
- "nexe",
-} };
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.gyp b/ppapi/native_client/src/trusted/plugin/plugin.gyp
index 343883d..843f2042 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.gyp
+++ b/ppapi/native_client/src/trusted/plugin/plugin.gyp
@@ -7,57 +7,13 @@
'includes': [
'plugin.gypi',
],
- 'target_defaults': {
- 'variables': {
- 'target_base': 'none',
- },
- 'target_conditions': [
- ['target_base=="ppNaClPlugin"', {
- 'sources': [
- '<@(common_sources)',
- ],
- 'xcode_settings': {
- 'WARNING_CFLAGS!': [
- # TODO(bradnelson): remove -pedantic when --std=c++98 in common.gypi
- '-pedantic',
- ],
- 'WARNING_CFLAGS': [
- '-Wno-deprecated',
- '-Wno-deprecated-declarations',
- ],
- },
- 'conditions': [
- ['OS=="win"', {
- 'sources': [
- 'win/nacl_plugin.rc',
- ],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'ExceptionHandling': '2', # /EHsc
- },
- 'VCLinkerTool': {
- 'AdditionalLibraryDirectories': [
- '$(OutDir)/lib',
- ],
- },
- },
- }],
- ],
- }],
- ],
- },
'targets': [
{
- 'target_name': 'ppGoogleNaClPluginChrome',
- 'type': 'loadable_module',
+ 'target_name': 'nacl_trusted_plugin',
+ 'type': 'static_library',
'sources': [
'<@(common_sources)',
],
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '-Wl,-exported_symbols_list <(DEPTH)/ppapi/native_client/src/trusted/plugin/ppapi.def'
- ],
- },
'dependencies': [
'<(DEPTH)/media/media.gyp:shared_memory_support',
'<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio',
@@ -65,26 +21,14 @@
'<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform',
'<(DEPTH)/native_client/src/shared/srpc/srpc.gyp:nonnacl_srpc',
'<(DEPTH)/native_client/src/trusted/desc/desc.gyp:nrd_xfer',
- '<(DEPTH)/native_client/src/trusted/nonnacl_util/nonnacl_util.gyp:nonnacl_util',
+ '<(DEPTH)/native_client/src/trusted/nonnacl_util/nonnacl_util.gyp:sel_ldr_launcher_base',
'<(DEPTH)/native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib',
'<(DEPTH)/native_client/src/trusted/gio/gio_wrapped_desc.gyp:gio_wrapped_desc',
'<(DEPTH)/native_client/src/trusted/simple_service/simple_service.gyp:simple_service',
'<(DEPTH)/native_client/src/trusted/reverse_service/reverse_service.gyp:reverse_service',
'<(DEPTH)/native_client/src/trusted/weak_ref/weak_ref.gyp:weak_ref',
- '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp',
- ],
- 'conditions': [
- ['OS=="mac"', {
- 'mac_bundle': 1,
- 'product_name': 'ppGoogleNaClPluginChrome',
- 'product_extension': 'plugin',
- }],
- ['OS=="mac" and mac_breakpad==1', {
- 'variables': {
- # A real .dSYM is needed for dump_syms to operate on.
- 'mac_real_dsym': 1,
- },
- }],
+ '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp_objects',
+ '<(DEPTH)/ppapi/ppapi.gyp:ppapi_internal_module',
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [4267, ],
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.gypi b/ppapi/native_client/src/trusted/plugin/plugin.gypi
index a29fac1..aa8f3ac 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.gypi
+++ b/ppapi/native_client/src/trusted/plugin/plugin.gypi
@@ -12,6 +12,7 @@
'pnacl_coordinator.cc',
'pnacl_resources.cc',
'pnacl_translate_thread.cc',
+ 'ppapi_entrypoints.cc',
'sel_ldr_launcher_chrome.cc',
'service_runtime.cc',
'srpc_client.cc',
diff --git a/ppapi/native_client/src/trusted/plugin/ppapi.def b/ppapi/native_client/src/trusted/plugin/ppapi.def
deleted file mode 100644
index b9643e8..0000000
--- a/ppapi/native_client/src/trusted/plugin/ppapi.def
+++ /dev/null
@@ -1,3 +0,0 @@
-_PPP_GetInterface
-_PPP_InitializeModule
-_PPP_ShutdownModule
diff --git a/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.cc b/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.cc
new file mode 100644
index 0000000..51f4f57
--- /dev/null
+++ b/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.cc
@@ -0,0 +1,39 @@
+// Copyright (c) 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.
+
+#include "ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h"
+
+#include "ppapi/c/pp_errors.h"
+#include "ppapi/c/pp_module.h"
+#include "ppapi/c/ppb.h"
+#include "ppapi/cpp/module.h"
+#include "ppapi/cpp/private/internal_module.h"
+#include "ppapi/native_client/src/trusted/plugin/module_ppapi.h"
+
+namespace nacl_plugin {
+
+int32_t PPP_InitializeModule(PP_Module module_id,
+ PPB_GetInterface get_browser_interface) {
+ plugin::ModulePpapi* module = new plugin::ModulePpapi();
+ if (!module->InternalInit(module_id, get_browser_interface)) {
+ delete module;
+ return PP_ERROR_FAILED;
+ }
+
+ pp::InternalSetModuleSingleton(module);
+ return PP_OK;
+}
+
+void PPP_ShutdownModule() {
+ delete pp::Module::Get();
+ pp::InternalSetModuleSingleton(NULL);
+}
+
+const void* PPP_GetInterface(const char* interface_name) {
+ if (!pp::Module::Get())
+ return NULL;
+ return pp::Module::Get()->GetPluginInterface(interface_name);
+}
+
+} // namespace nacl_plugin
diff --git a/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h b/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h
new file mode 100644
index 0000000..6681c2e
--- /dev/null
+++ b/ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h
@@ -0,0 +1,21 @@
+// Copyright (c) 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 PPAPI_NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PPAPI_ENTRYPOINTS_H_
+#define PPAPI_NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PPAPI_ENTRYPOINTS_H_
+
+#include "ppapi/c/pp_module.h"
+#include "ppapi/c/ppb.h"
+
+// Provides entry points for the trusted plugin.
+namespace nacl_plugin {
+
+int PPP_InitializeModule(PP_Module module,
+ PPB_GetInterface get_browser_interface);
+const void* PPP_GetInterface(const char* interface_name);
+void PPP_ShutdownModule();
+
+} // namespace nacl_plugin
+
+#endif // PPAPI_NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PPAPI_ENTRYPOINTS_H_
diff --git a/ppapi/native_client/src/trusted/plugin/win/nacl_plugin.rc b/ppapi/native_client/src/trusted/plugin/win/nacl_plugin.rc
deleted file mode 100644
index 4dd3354..0000000
--- a/ppapi/native_client/src/trusted/plugin/win/nacl_plugin.rc
+++ /dev/null
@@ -1,102 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-// #include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "windows.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904e4"
- BEGIN
- VALUE "FileDescription", "NativeClient Execution Environment"
- VALUE "FileVersion", "1, 0, 0, 1"
- VALUE "InternalName", "nacl_plugin"
- VALUE "LegalCopyright", "Copyright (C) 2007, 2008"
- VALUE "MIMEType", "application/x-nacl"
- VALUE "OriginalFilename", "nacl_plugin.dll"
- VALUE "ProductName", "NativeClient Execution Environment"
- VALUE "ProductVersion", "1, 0, 0, 1"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1252
- END
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/ppapi/ppapi_cpp.gypi b/ppapi/ppapi_cpp.gypi
index 622c3d5..28433e4 100644
--- a/ppapi/ppapi_cpp.gypi
+++ b/ppapi/ppapi_cpp.gypi
@@ -24,7 +24,7 @@
],
},
{
- # GN version: //ppapi:ppapi_cpp_pbjects
+ # GN version: //ppapi:ppapi_cpp_objects
'target_name': 'ppapi_cpp_objects',
'type': 'static_library',
'dependencies': [
@@ -83,5 +83,17 @@
}]
],
},
+ {
+ # GN version: //ppapi:ppapi_internal_module
+ 'target_name': 'ppapi_internal_module',
+ 'type': 'static_library',
+ 'include_dirs+': [
+ '..',
+ ],
+ 'sources': [
+ 'cpp/private/internal_module.cc',
+ 'cpp/private/internal_module.h',
+ ]
+ },
],
}
diff --git a/remoting/client/plugin/pepper_entrypoints.cc b/remoting/client/plugin/pepper_entrypoints.cc
index c6923e3..7cd5bf1 100644
--- a/remoting/client/plugin/pepper_entrypoints.cc
+++ b/remoting/client/plugin/pepper_entrypoints.cc
@@ -11,18 +11,9 @@
#include "ppapi/c/ppb_instance.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
+#include "ppapi/cpp/private/internal_module.h"
#include "remoting/client/plugin/chromoting_instance.h"
-static pp::Module* g_module_singleton = NULL;
-
-namespace pp {
-
-Module* Module::Get() {
- return g_module_singleton;
-}
-
-} // namespace pp
-
namespace remoting {
class ChromotingModule : public pp::Module {
@@ -46,13 +37,13 @@ int32_t PPP_InitializeModule(PP_Module module_id,
ChromotingInstance::RegisterLogMessageHandler();
#endif
- g_module_singleton = module;
+ pp::InternalSetModuleSingleton(module);
return PP_OK;
}
void PPP_ShutdownModule() {
delete pp::Module::Get();
- g_module_singleton = NULL;
+ pp::InternalSetModuleSingleton(NULL);
}
const void* PPP_GetInterface(const char* interface_name) {
diff --git a/remoting/remoting_client.gypi b/remoting/remoting_client.gypi
index abfc4dc..d7d66f1 100644
--- a/remoting/remoting_client.gypi
+++ b/remoting/remoting_client.gypi
@@ -14,6 +14,7 @@
'dependencies': [
'../net/net.gyp:net',
'../ppapi/ppapi.gyp:ppapi_cpp_objects',
+ '../ppapi/ppapi.gyp:ppapi_internal_module',
'../third_party/webrtc/modules/modules.gyp:desktop_capture',
'../ui/events/events.gyp:dom4_keycode_converter',
'remoting_base',